Check for the WooCommerce Admin class before adding notice

This commit is contained in:
Joshua Flowers 2020-01-13 17:43:27 +08:00
parent dbb8ab8d1e
commit 902e1cc184
1 changed files with 1 additions and 1 deletions

View File

@ -365,7 +365,7 @@ class WC_Admin_Notices {
* @todo Remove this notice and associated code once the feature plugin has been merged into core.
*/
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' );
return;
}