Automattic\WooCommerce\Blocks\BlockTypes

MiniCart::register_empty_cart_message_block_pattern()publicWC 1.0

Register block pattern for Empty Cart Message to make it translatable.

Метод класса: MiniCart{}

Хуков нет.

Возвращает

null. Ничего.

Использование

$MiniCart = new MiniCart();
$MiniCart->register_empty_cart_message_block_pattern();

Код MiniCart::register_empty_cart_message_block_pattern() WC 7.5.0

public function register_empty_cart_message_block_pattern() {
	register_block_pattern(
		'woocommerce/mini-cart-empty-cart-message',
		array(
			'title'    => __( 'Empty Mini Cart Message', 'woocommerce' ),
			'inserter' => false,
			'content'  => '<!-- wp:paragraph {"align":"center"} --><p class="has-text-align-center"><strong>' . __( 'Your cart is currently empty!', 'woocommerce' ) . '</strong></p><!-- /wp:paragraph -->',
		)
	);
}