Automattic\WooCommerce\Blocks\BlockTypes

CheckoutActionsBlock::register_style_variations()publicWC 1.0

Register style variations for the block.

Method of the class: CheckoutActionsBlock{}

No Hooks.

Return

null. Nothing (null).

Usage

$CheckoutActionsBlock = new CheckoutActionsBlock();
$CheckoutActionsBlock->register_style_variations();

CheckoutActionsBlock::register_style_variations() code WC 9.6.0

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,
		)
	);
}