Automattic\WooCommerce\Blocks\BlockTypes
CheckoutActionsBlock::register_style_variations
Register style variations for the block.
Method of the class: CheckoutActionsBlock{}
No Hooks.
Returns
null. Nothing (null).
Usage
$CheckoutActionsBlock = new CheckoutActionsBlock(); $CheckoutActionsBlock->register_style_variations();
CheckoutActionsBlock::register_style_variations() CheckoutActionsBlock::register style variations code WC 10.6.2
public function register_style_variations() {
register_block_style(
$this->get_full_block_name(),
array(
'name' => 'without-price',
'label' => __( 'Hide Price', 'woocommerce' ),
'is_default' => true,
)
);
register_block_style(
$this->get_full_block_name(),
array(
'name' => 'with-price',
'label' => __( 'Show Price', 'woocommerce' ),
'is_default' => false,
)
);
}