Automattic\WooCommerce\Blocks\BlockTypes

AbstractInnerBlock::get_block_type_script()protectedWC 1.0

For lazy loaded inner blocks, we don't want to enqueue the script but rather leave it for webpack to do that.

Method of the class: AbstractInnerBlock{}

No Hooks.

Return

Array|String|null.

Usage

// protected - for code of main (parent) or child class
$result = $this->get_block_type_script( $key );
$key(string)
Data to get, or default to everything.
Default: null

Notes

AbstractInnerBlock::get_block_type_script() code WC 8.9.0

protected function get_block_type_script( $key = null ) {

	if ( $this->is_lazy_loaded ) {
		return null;
	}

	return parent::get_block_type_script( $key );
}