Automattic\WooCommerce\Blocks\BlockTypes\OrderConfirmation
AbstractOrderConfirmationBlock::register_patterns()
Register block pattern for Order Confirmation to make it translatable.
Method of the class: AbstractOrderConfirmationBlock{}
No Hooks.
Return
null
. Nothing (null).
Usage
$AbstractOrderConfirmationBlock = new AbstractOrderConfirmationBlock(); $AbstractOrderConfirmationBlock->register_patterns();
AbstractOrderConfirmationBlock::register_patterns() AbstractOrderConfirmationBlock::register patterns code WC 9.4.2
public function register_patterns() { register_block_pattern( 'woocommerce/order-confirmation-totals-heading', array( 'title' => '', 'inserter' => false, 'content' => '<!-- wp:heading {"level":3,"style":{"typography":{"fontSize":"24px"}}} --><h3 class="wp-block-heading" style="font-size:24px">' . esc_html__( 'Order details', 'woocommerce' ) . '</h3><!-- /wp:heading -->', ) ); register_block_pattern( 'woocommerce/order-confirmation-downloads-heading', array( 'title' => '', 'inserter' => false, 'content' => '<!-- wp:heading {"level":3,"style":{"typography":{"fontSize":"24px"}}} --><h3 class="wp-block-heading" style="font-size:24px">' . esc_html__( 'Downloads', 'woocommerce' ) . '</h3><!-- /wp:heading -->', ) ); register_block_pattern( 'woocommerce/order-confirmation-shipping-heading', array( 'title' => '', 'inserter' => false, 'content' => '<!-- wp:heading {"level":3,"style":{"typography":{"fontSize":"24px"}}} --><h3 class="wp-block-heading" style="font-size:24px">' . esc_html__( 'Shipping address', 'woocommerce' ) . '</h3><!-- /wp:heading -->', ) ); register_block_pattern( 'woocommerce/order-confirmation-billing-heading', array( 'title' => '', 'inserter' => false, 'content' => '<!-- wp:heading {"level":3,"style":{"typography":{"fontSize":"24px"}}} --><h3 class="wp-block-heading" style="font-size:24px">' . esc_html__( 'Billing address', 'woocommerce' ) . '</h3><!-- /wp:heading -->', ) ); register_block_pattern( 'woocommerce/order-confirmation-additional-fields-heading', array( 'title' => '', 'inserter' => false, 'content' => '<!-- wp:heading {"level":3,"style":{"typography":{"fontSize":"24px"}}} --><h3 class="wp-block-heading" style="font-size:24px">' . esc_html__( 'Additional information', 'woocommerce' ) . '</h3><!-- /wp:heading -->', ) ); }