fix: check whether WC_ADMIN_APP is defined before using (#38806)
This commit is contained in:
parent
5b0aa22402
commit
bc2cba7b81
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: fix
|
||||
|
||||
check for WC_ADMIN_APP constant before using it
|
|
@ -78,6 +78,9 @@ add_action( 'plugins_loaded', '_wc_beta_tester_bootstrap' );
|
|||
* Register the JS.
|
||||
*/
|
||||
function add_extension_register_script() {
|
||||
if ( ! defined( 'WC_ADMIN_APP' ) ) {
|
||||
return;
|
||||
}
|
||||
$script_path = '/build/index.js';
|
||||
$script_asset_path = dirname( __FILE__ ) . '/build/index.asset.php';
|
||||
$script_asset = file_exists( $script_asset_path )
|
||||
|
|
Loading…
Reference in New Issue