Prefix script with `wc-`

This commit is contained in:
Chris Marslender 2017-11-17 15:54:44 -07:00
parent 0c981767b2
commit 23ef2af311
No known key found for this signature in database
GPG Key ID: 5A3FF8E135EABA2C
1 changed files with 2 additions and 2 deletions

View File

@ -298,13 +298,13 @@ class WC_Admin_Dashboard {
public function network_orders() {
$suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
wp_enqueue_script( 'network-orders', WC()->plugin_url() . '/assets/js/admin/network-orders' . $suffix . '.js', array( 'jquery', 'underscore' ), WC_VERSION, true );
wp_enqueue_script( 'wc-network-orders', WC()->plugin_url() . '/assets/js/admin/network-orders' . $suffix . '.js', array( 'jquery', 'underscore' ), WC_VERSION, true );
$user = wp_get_current_user();
$blogs = get_blogs_of_user( $user->ID );
$blog_ids = wp_list_pluck( $blogs, 'userblog_id' );
wp_localize_script( 'network-orders', 'woocommerce_network_orders', array(
wp_localize_script( 'wc-network-orders', 'woocommerce_network_orders', array(
'nonce' => wp_create_nonce( 'wp_rest' ),
'sites' => array_values( $blog_ids ),
'order_endpoint' => get_rest_url( null, 'wc/v2/orders/network' ),