Gutenberg and WooCommerce to be installed and active.', 'wc-admin' ),
'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 wc_admin_plugins_loaded() {
if (
! ( defined( 'GUTENBERG_DEVELOPMENT_MODE' ) || defined( 'GUTENBERG_VERSION' ) ) ||
! class_exists( 'WooCommerce' )
) {
add_action( 'admin_notices', 'wc_admin_plugins_notice' );
return;
}
// Initialize the WC API extensions.
require_once dirname( __FILE__ ) . 'includes/class-wc-admin-api-init.php';
// 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', 'wc_admin_plugins_loaded' );