Plugin Updates

This commit is contained in:
Tony Volpe
2024-04-02 20:23:21 +00:00
parent 96800520e8
commit 94170ec2c4
1514 changed files with 133309 additions and 105985 deletions

View File

@@ -283,7 +283,7 @@ class WC_Admin_Meta_Boxes {
* @return string[] Templates array excluding block-based templates.
*/
public function remove_block_templates( $templates ) {
if ( count( $templates ) === 0 || ! wc_current_theme_is_fse_theme() || ( ! function_exists( 'gutenberg_get_block_template' ) && ! function_exists( 'get_block_template' ) ) ) {
if ( count( $templates ) === 0 || ! wc_current_theme_is_fse_theme() ) {
return $templates;
}
@@ -296,9 +296,7 @@ class WC_Admin_Meta_Boxes {
continue;
}
$block_template = function_exists( 'gutenberg_get_block_template' ) ?
gutenberg_get_block_template( $theme . '//' . $template_key ) :
get_block_template( $theme . '//' . $template_key );
$block_template = get_block_template( $theme . '//' . $template_key );
// If the block template has the product post type specified, include it.
if ( $block_template && is_array( $block_template->post_types ) && in_array( 'product', $block_template->post_types ) ) {