Merge pull request #15850 from woocommerce/fix/15848

Dont set everything up if 'woocommerce_admin' doesn't exist
This commit is contained in:
Mike Jolley 2017-06-28 16:41:21 +01:00 committed by GitHub
commit 67b8779861
1 changed files with 4 additions and 0 deletions

View File

@ -1,6 +1,10 @@
/* global woocommerce_admin */
jQuery( function ( $ ) {
if ( 'undefined' === typeof woocommerce_admin ) {
return;
}
// Add buttons to product screen.
var $product_screen = $( '.edit-php.post-type-product' ),
$title_action = $product_screen.find( '.page-title-action:first' ),