Automattic\WooCommerce\Blocks
BlockTemplatesController::add_block_template_details()
Add the template title and description to WooCommerce templates.
Method of the class: BlockTemplatesController{}
No Hooks.
Return
WP_Block_Template|null
.
Usage
$BlockTemplatesController = new BlockTemplatesController(); $BlockTemplatesController->add_block_template_details( $block_template, $id, $template_type );
- $block_template(WP_Block_Template|null) (required)
- The found block template, or null if there isn't one.
- $id(string) (required)
- Template unique identifier (example: 'theme_slug//template_slug').
- $template_type(array) (required)
- Template type: 'wp_template' or 'wp_template_part'.
BlockTemplatesController::add_block_template_details() BlockTemplatesController::add block template details code WC 9.4.2
public function add_block_template_details( $block_template, $id, $template_type ) { return BlockTemplateUtils::update_template_data( $block_template, $template_type ); }