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

Commit 0322f24

Browse files
Aljullugigitux
authored andcommitted
Replace instances of wp_is_block_theme() with wc_current_theme_is_fse_theme() (#6590)
1 parent e4d8540 commit 0322f24

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

src/BlockTypes/MiniCart.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,7 @@ protected function enqueue_data( array $attributes = [] ) {
199199

200200
if (
201201
current_user_can( 'edit_theme_options' ) &&
202-
function_exists( 'wp_is_block_theme' ) &&
203-
wp_is_block_theme()
202+
wc_current_theme_is_fse_theme()
204203
) {
205204
$theme_slug = BlockTemplateUtils::theme_has_template_part( 'mini-cart' ) ? wp_get_theme()->get_stylesheet() : BlockTemplateUtils::PLUGIN_SLUG;
206205
$site_editor_uri = admin_url( 'site-editor.php' );

src/Templates/ProductSearchResultsTemplate.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ protected function init() {
3333
* @param array $templates Templates that match the search hierarchy.
3434
*/
3535
public function update_search_template_hierarchy( $templates ) {
36-
if ( ( is_search() && is_post_type_archive( 'product' ) ) && wp_is_block_theme() ) {
36+
if ( ( is_search() && is_post_type_archive( 'product' ) ) && wc_current_theme_is_fse_theme() ) {
3737
return [ self::SLUG ];
3838
}
3939
return $templates;

src/Utils/BlockTemplateUtils.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ public static function theme_has_template_part( $template_name ) {
366366
*/
367367
public static function supports_block_templates() {
368368
if (
369-
( ! function_exists( 'wp_is_block_theme' ) || ! wp_is_block_theme() ) &&
369+
! wc_current_theme_is_fse_theme() &&
370370
( ! function_exists( 'gutenberg_supports_block_templates' ) || ! gutenberg_supports_block_templates() )
371371
) {
372372
return false;

0 commit comments

Comments
 (0)