Gutenberg and WooCommerce to be installed and active.', 'woo-dash' ),
'https://wordpress.org/plugins/gutenberg/',
'https://wordpress.org/plugins/woocommerce/'
);
printf( '
', $message ); /* WPCS: xss ok. */
}
/**
* 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' ) ) {
add_action( 'admin_notices', 'woo_dash_plugins_notice' );
return;
}
// Some common utilities
require_once dirname( __FILE__ ) . '/lib/common.php';
// Register script files
require_once dirname( __FILE__ ) . '/lib/client-assets.php';
// Create the Admin pages
require_once dirname( __FILE__ ) . '/lib/admin.php';
}
add_action( 'plugins_loaded', 'woo_dash_plugins_loaded' );