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 6.8.0

public function register_empty_cart_message_block_pattern() {
	register_block_pattern(
		'woocommerce/mini-cart-empty-cart-message',
		array(
			'title'    => __( 'Mini Cart Empty 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 -->',
		)
	);
}