Automattic\WooCommerce\Blocks\BlockTypes

AbstractBlock::get_block_type_style()protectedWC 1.0

Get the frontend style handle for this block type.

Method of the class: AbstractBlock{}

No Hooks.

Return

String[]|null.

Usage

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

AbstractBlock::get_block_type_style() code WC 8.7.0

protected function get_block_type_style() {
	$this->asset_api->register_style( 'wc-blocks-style-' . $this->block_name, $this->asset_api->get_block_asset_build_path( $this->block_name, 'css' ), [], 'all', true );

	return [ 'wc-blocks-style', 'wc-blocks-style-' . $this->block_name ];
}