Fix: Mini Cart block: Edit template part link doesn't work for themes don't have mini cart template part. (https://github.com/woocommerce/woocommerce-blocks/pull/5347)
This commit is contained in:
parent
6cbff66977
commit
b3ba90e7e9
|
@ -8,6 +8,7 @@ use Automattic\WooCommerce\Blocks\Assets\AssetDataRegistry;
|
|||
use Automattic\WooCommerce\Blocks\Assets\Api as AssetApi;
|
||||
use Automattic\WooCommerce\Blocks\Integrations\IntegrationRegistry;
|
||||
use Automattic\WooCommerce\Blocks\Utils\StyleAttributesUtils;
|
||||
use Automattic\WooCommerce\Blocks\Utils\BlockTemplateUtils;
|
||||
|
||||
/**
|
||||
* Mini Cart class.
|
||||
|
@ -172,7 +173,7 @@ class MiniCart extends AbstractBlock {
|
|||
|
||||
$this->asset_data_registry->add(
|
||||
'themeSlug',
|
||||
wp_get_theme()->get_stylesheet(),
|
||||
BlockTemplateUtils::theme_has_template_part( 'mini-cart' ) ? wp_get_theme()->get_stylesheet() : 'woocommerce',
|
||||
''
|
||||
);
|
||||
|
||||
|
|
Loading…
Reference in New Issue