Merge pull request #25395 from woocommerce/fix/25394

Check for the WooCommerce Admin class before adding notice
This commit is contained in:
Rodrigo Primo 2020-01-17 09:52:38 -03:00 committed by GitHub
commit f0ccd9bd50
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -367,7 +367,7 @@ class WC_Admin_Notices {
* @todo Remove this notice and associated code once the feature plugin has been merged into core. * @todo Remove this notice and associated code once the feature plugin has been merged into core.
*/ */
public static function wc_admin_feature_plugin_notice() { public static function wc_admin_feature_plugin_notice() {
if ( get_user_meta( get_current_user_id(), 'dismissed_wc_admin_notice', true ) || self::is_plugin_active( 'woocommerce-admin/woocommerce-admin.php' ) ) { if ( get_user_meta( get_current_user_id(), 'dismissed_wc_admin_notice', true ) || class_exists( 'Automattic\WooCommerce\Admin\FeaturePlugin' ) ) {
self::remove_notice( 'wc_admin' ); self::remove_notice( 'wc_admin' );
return; return;
} }