Automattic\WooCommerce\Blocks\BlockTypes
MiniCart::register_empty_cart_message_block_pattern
Register block pattern for Empty Cart Message to make it translatable.
Метод класса: MiniCart{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
$MiniCart = new MiniCart(); $MiniCart->register_empty_cart_message_block_pattern();
Код MiniCart::register_empty_cart_message_block_pattern() MiniCart::register empty cart message block pattern WC 10.9.4
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 -->',
)
);
}