Remove SCRIPT_DEBUG requirement
This commit is contained in:
parent
a490287f0a
commit
45c03845b2
|
@ -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.
|
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
|
## Development
|
||||||
|
|
||||||
After cloning the repo, install dependencies with `npm install`. Now you can build the files using one of these commands:
|
After cloning the repo, install dependencies with `npm install`. Now you can build the files using one of these commands:
|
||||||
|
|
|
@ -34,9 +34,8 @@ function wc_admin_plugins_notice() {
|
||||||
|
|
||||||
if ( $wordpress_includes_gutenberg ) {
|
if ( $wordpress_includes_gutenberg ) {
|
||||||
$message = sprintf(
|
$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 */
|
/* 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/'
|
'https://wordpress.org/plugins/woocommerce/'
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
|
@ -65,11 +64,7 @@ function dependencies_satisfied() {
|
||||||
$wordpress_includes_gutenberg = version_compare( $wordpress_version, '4.9.9', '>' );
|
$wordpress_includes_gutenberg = version_compare( $wordpress_version, '4.9.9', '>' );
|
||||||
$gutenberg_plugin_active = defined( 'GUTENBERG_DEVELOPMENT_MODE' ) || defined( 'GUTENBERG_VERSION' );
|
$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.
|
return $wordpress_includes_gutenberg || $gutenberg_plugin_active;
|
||||||
// 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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue