Automattic\WooCommerce\Blocks
BlockTypesController::register_block_patterns
Register block patterns
Method of the class: BlockTypesController{}
No Hooks.
Returns
null. Nothing (null).
Usage
$BlockTypesController = new BlockTypesController(); $BlockTypesController->register_block_patterns();
BlockTypesController::register_block_patterns() BlockTypesController::register block patterns code WC 10.9.4
public function register_block_patterns() {
register_block_pattern(
'woocommerce/order-confirmation-totals-heading',
array(
'title' => '',
'inserter' => false,
'content' => '<!-- wp:heading {"level":2,"style":{"typography":{"fontSize":"24px"}}} --><h2 class="wp-block-heading" style="font-size:24px">' . esc_html__( 'Order details', 'woocommerce' ) . '</h2><!-- /wp:heading -->',
)
);
register_block_pattern(
'woocommerce/order-confirmation-downloads-heading',
array(
'title' => '',
'inserter' => false,
'content' => '<!-- wp:heading {"level":2,"style":{"typography":{"fontSize":"24px"}}} --><h2 class="wp-block-heading" style="font-size:24px">' . esc_html__( 'Downloads', 'woocommerce' ) . '</h2><!-- /wp:heading -->',
)
);
register_block_pattern(
'woocommerce/order-confirmation-shipping-heading',
array(
'title' => '',
'inserter' => false,
'content' => '<!-- wp:heading {"level":2,"style":{"typography":{"fontSize":"24px"}}} --><h2 class="wp-block-heading" style="font-size:24px">' . esc_html__( 'Shipping address', 'woocommerce' ) . '</h2><!-- /wp:heading -->',
)
);
register_block_pattern(
'woocommerce/order-confirmation-billing-heading',
array(
'title' => '',
'inserter' => false,
'content' => '<!-- wp:heading {"level":2,"style":{"typography":{"fontSize":"24px"}}} --><h2 class="wp-block-heading" style="font-size:24px">' . esc_html__( 'Billing address', 'woocommerce' ) . '</h2><!-- /wp:heading -->',
)
);
register_block_pattern(
'woocommerce/order-confirmation-additional-fields-heading',
array(
'title' => '',
'inserter' => false,
'content' => '<!-- wp:heading {"level":2,"style":{"typography":{"fontSize":"24px"}}} --><h2 class="wp-block-heading" style="font-size:24px">' . esc_html__( 'Additional information', 'woocommerce' ) . '</h2><!-- /wp:heading -->',
)
);
}