Automattic\WooCommerce\Blocks\BlockTypes
MiniCart::register_empty_cart_message_block_pattern()
Register block pattern for Empty Cart Message to make it translatable.
Method of the class: MiniCart{}
No Hooks.
Return
null
. Nothing (null).
Usage
$MiniCart = new MiniCart(); $MiniCart->register_empty_cart_message_block_pattern();
MiniCart::register_empty_cart_message_block_pattern() MiniCart::register empty cart message block pattern code WC 9.4.2
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 -->', ) ); }