Merge pull request #15850 from woocommerce/fix/15848
Dont set everything up if 'woocommerce_admin' doesn't exist
This commit is contained in:
commit
67b8779861
|
@ -1,6 +1,10 @@
|
||||||
/* global woocommerce_admin */
|
/* global woocommerce_admin */
|
||||||
jQuery( function ( $ ) {
|
jQuery( function ( $ ) {
|
||||||
|
|
||||||
|
if ( 'undefined' === typeof woocommerce_admin ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Add buttons to product screen.
|
// Add buttons to product screen.
|
||||||
var $product_screen = $( '.edit-php.post-type-product' ),
|
var $product_screen = $( '.edit-php.post-type-product' ),
|
||||||
$title_action = $product_screen.find( '.page-title-action:first' ),
|
$title_action = $product_screen.find( '.page-title-action:first' ),
|
||||||
|
|
Loading…
Reference in New Issue