Remove SCRIPT_DEBUG requirement

This commit is contained in:
Allen Snook 2018-11-09 09:49:33 -05:00
parent a490287f0a
commit 45c03845b2
2 changed files with 2 additions and 11 deletions

View File

@ -14,10 +14,6 @@ This is a feature plugin for a modern, javascript-driven WooCommerce Admin exper
For better debugging, it's also recommended you add `define( 'SCRIPT_DEBUG', true );` to your wp-config. This will load the unminified version of all libraries, and specifically the development build of React.
### WordPress 5
There is an unresolved bug ( https://github.com/woocommerce/wc-admin/issues/796 ) that prevents us from running with minified script. Until this is resolved, include `define( 'SCRIPT_DEBUG', true );` in your wp-config.
## Development
After cloning the repo, install dependencies with `npm install`. Now you can build the files using one of these commands:

View File

@ -34,9 +34,8 @@ function wc_admin_plugins_notice() {
if ( $wordpress_includes_gutenberg ) {
$message = sprintf(
// TODO: Remove the "and SCRIPT_DEBUG enabled" when https://github.com/woocommerce/wc-admin/issues/796 is fixed.
/* translators: URL of WooCommerce plugin */
__( 'The WooCommerce Admin feature plugin requires <a href="%s">WooCommerce</a> (>3.5) to be installed and active and SCRIPT_DEBUG enabled.', 'wc-admin' ),
__( 'The WooCommerce Admin feature plugin requires <a href="%s">WooCommerce</a> (>3.5) to be installed and active.', 'wc-admin' ),
'https://wordpress.org/plugins/woocommerce/'
);
} else {
@ -65,11 +64,7 @@ function dependencies_satisfied() {
$wordpress_includes_gutenberg = version_compare( $wordpress_version, '4.9.9', '>' );
$gutenberg_plugin_active = defined( 'GUTENBERG_DEVELOPMENT_MODE' ) || defined( 'GUTENBERG_VERSION' );
// Right now, there is a bug preventing us from running with WP5 with minified script.
// See https://github.com/woocommerce/wc-admin/issues/796 for details.
$script_debug_enabled = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG;
return ( $script_debug_enabled && $wordpress_includes_gutenberg ) || $gutenberg_plugin_active;
return $wordpress_includes_gutenberg || $gutenberg_plugin_active;
}
/**