Add check for `GUTENBERG_DEVELOPMENT_MODE`

This commit is contained in:
Kelly Dwan 2018-05-04 10:46:16 -04:00
parent 4cc9ed1961
commit 5e37d798af
1 changed files with 5 additions and 1 deletions

View File

@ -32,7 +32,11 @@ function woo_dash_plugins_notice() {
* Set up the plugin, only if we can detect both Gutenberg and WooCommerce
*/
function woo_dash_plugins_loaded() {
if ( ! defined( 'GUTENBERG_VERSION' ) || ! class_exists( 'WooCommerce' ) ) {
if (
! defined( 'GUTENBERG_DEVELOPMENT_MODE' ) ||
! defined( 'GUTENBERG_VERSION' ) ||
! class_exists( 'WooCommerce' )
) {
add_action( 'admin_notices', 'woo_dash_plugins_notice' );
return;
}