FSE: Fix icon fonts not being loaded in the Site Editor (#35532)
* Site Editor: Fix WooCommerce icons in the Site Editor * Site Editor: Fix WooCommerce icons not loading in the site editor. * Add additional FSE theme check
This commit is contained in:
parent
63242cfa62
commit
f9dacb78a6
|
@ -0,0 +1,4 @@
|
||||||
|
Significance: minor
|
||||||
|
Type: fix
|
||||||
|
|
||||||
|
Fix WooCommerce icons not loading in the site editor.
|
|
@ -2,6 +2,7 @@
|
||||||
* woocommerce-blocktheme.scss
|
* woocommerce-blocktheme.scss
|
||||||
* Block theme default styles to ensure WooCommerce looks better out of the box with block themes that are not optimised for WooCommerce specifically.
|
* Block theme default styles to ensure WooCommerce looks better out of the box with block themes that are not optimised for WooCommerce specifically.
|
||||||
*/
|
*/
|
||||||
|
@import "fonts";
|
||||||
@import "variables";
|
@import "variables";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -57,6 +57,11 @@ if ( ! class_exists( 'WC_Admin_Assets', false ) ) :
|
||||||
if ( $screen && $screen->is_block_editor() ) {
|
if ( $screen && $screen->is_block_editor() ) {
|
||||||
wp_register_style( 'woocommerce-general', WC()->plugin_url() . '/assets/css/woocommerce.css', array(), $version );
|
wp_register_style( 'woocommerce-general', WC()->plugin_url() . '/assets/css/woocommerce.css', array(), $version );
|
||||||
wp_style_add_data( 'woocommerce-general', 'rtl', 'replace' );
|
wp_style_add_data( 'woocommerce-general', 'rtl', 'replace' );
|
||||||
|
if ( wc_current_theme_is_fse_theme() ) {
|
||||||
|
wp_register_style( 'woocommerce-blocktheme', WC()->plugin_url() . '/assets/css/woocommerce-blocktheme.css', array(), $version );
|
||||||
|
wp_style_add_data( 'woocommerce-blocktheme', 'rtl', 'replace' );
|
||||||
|
wp_enqueue_style( 'woocommerce-blocktheme' );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sitewide menu CSS.
|
// Sitewide menu CSS.
|
||||||
|
|
Loading…
Reference in New Issue