Automattic\WooCommerce\Blocks\BlockTypes
AbstractInnerBlock::get_block_type_script()
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.
Returns
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
- See: $this->register_block_type()
AbstractInnerBlock::get_block_type_script() AbstractInnerBlock::get block type script code WC 9.8.5
protected function get_block_type_script( $key = null ) { if ( $this->is_lazy_loaded ) { return null; } return parent::get_block_type_script( $key ); }