Merge pull request #30277 from mahmoudsaeed/trunk

Fix fatal error if $screen is null
This commit is contained in:
Vedanshu Jain 2021-07-15 18:39:21 +05:30 committed by GitHub
commit 7d3ac49f64
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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' );
}