Merge pull request #30277 from mahmoudsaeed/trunk
Fix fatal error if $screen is null
This commit is contained in:
commit
7d3ac49f64
|
@ -54,7 +54,7 @@ if ( ! class_exists( 'WC_Admin_Assets', false ) ) :
|
|||
wp_style_add_data( 'woocommerce_admin_marketplace_styles', 'rtl', 'replace' );
|
||||
wp_style_add_data( 'woocommerce_admin_privacy_styles', 'rtl', 'replace' );
|
||||
|
||||
if ( $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_style_add_data( 'woocommerce-general', 'rtl', 'replace' );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue