Address_List

Summary

Class Address_List


Description

A block to display the current user’s addresses


Source

File: src/BigCommerce/Editor/Gutenberg/Blocks/Address_List.php

class Address_List extends Gutenberg_Block {
	const NAME = 'bigcommerce/address-list';


	public function __construct() {
		parent::__construct();
	}

	public function render( $attributes ) {
		return sprintf( '[%s]', Shortcodes\Address_List::NAME ); // content will be passed through do_shortcode
	}

	public function js_config() {
		return [
			'name'      => $this->name(),
			'title'     => __( 'BigCommerce Address List', 'bigcommerce' ),
			'category'  => 'widgets',
			'keywords'  => [
				__( 'checkout', 'bigcommerce' ),
				__( 'shipping', 'bigcommerce' ),
			],
			'shortcode' => sprintf( '[%s]', Shortcodes\Address_List::NAME ),
		];
	}
}

Methods

  • __construct — A block to display the current user’s addresses
  • js_config — A block to display the current user’s addresses
  • render — A block to display the current user’s addresses

User Contributed Notes

You must log in before being able to contribute a note or feedback.