Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Blockfied Single Product Template: Add support for template for specific product #9069

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/BlockTemplatesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ function( $template ) {
$template->description = BlockTemplateUtils::get_block_template_description( $template->slug );
}

if ( 'single-product' === $template->slug ) {
if ( str_contains( $template->slug, 'single-product' ) ) {
if ( ! is_admin() && ! BlockTemplateUtils::template_has_legacy_template_block( $template ) ) {

$new_content = SingleProductTemplateCompatibility::add_compatibility_layer( $template->content );
Expand Down