Product_Components::js_config()

Summary

No summary available.

Return

(array)


Source

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

	public function js_config() {
		$config              = parent::js_config();

		$config['preview_url'] = $this->get_preview_url();

		$config['inspector'] = [
			'header'                   => __( 'Component Settings', 'bigcommerce' ),
			'product_id_label'         => __( 'Product ID', 'bigcommerce' ),
			'product_id_description'   => __( 'The product ID from BigCommerce', 'bigcommerce' ),
			'component_id_label'       => __( 'Product Component', 'bigcommerce' ),
			'component_id_description' => __( 'The component you would like to display', 'bigcommerce' ),
			'components'               => [
				[
					'key'   => self::SKU,
					'label' => __( 'SKU', 'bigcommerce' ),
				],
				[
					'key'   => self::IMAGE,
					'label' => __( 'Image', 'bigcommerce' ),
				],
				[
					'key'   => self::TITLE,
					'label' => __( 'Title', 'bigcommerce' ),
				],
				[
					'key'   => self::DESCRIPTION,
					'label' => __( 'Description', 'bigcommerce' ),
				],
				[
					'key'   => self::ADD_TO_CART,
					'label' => get_option( Cart::OPTION_ENABLE_CART, true ) ? __( 'Add to Cart', 'bigcommerce' ) : __( 'Buy Now', 'bigcommerce' ),
				],
			],
		];

		return $config;
	}


User Contributed Notes

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