Automattic\WooCommerce\Blocks\Assets

AssetDataRegistry::get_products_settings()protectedWC 1.0

Get product related settings.

Note: For the time being we are exposing only the settings that are used by blocks.

Method of the class: AssetDataRegistry{}

No Hooks.

Return

Array.

Usage

// protected - for code of main (parent) or child class
$result = $this->get_products_settings();

AssetDataRegistry::get_products_settings() code WC 9.2.3

protected function get_products_settings() {
	return [
		'cartRedirectAfterAdd' => get_option( 'woocommerce_cart_redirect_after_add' ) === 'yes',
	];
}