From 03c98e7ae788cc19adc32311b329c2ba99239a90 Mon Sep 17 00:00:00 2001 From: Claudio Sanches Date: Mon, 12 Mar 2018 17:37:45 -0300 Subject: [PATCH] Fixed missing shipping zones on settings Fixed empty wp_localize_script() when WC_Shipping_Zone->get_shipping_methods() loads as admin data instead of json. --- includes/class-wc-shipping-zones.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/includes/class-wc-shipping-zones.php b/includes/class-wc-shipping-zones.php index 2ddfac2a61b..24f353471bf 100644 --- a/includes/class-wc-shipping-zones.php +++ b/includes/class-wc-shipping-zones.php @@ -3,7 +3,6 @@ * Handles storage and retrieval of shipping zones * * @package WooCommerce/Classes - * @author Automattic * @version 3.3.0 * @since 2.6.0 */ @@ -33,7 +32,7 @@ class WC_Shipping_Zones { $zones[ $zone->get_id() ] = $zone->get_data(); $zones[ $zone->get_id() ]['zone_id'] = $zone->get_id(); $zones[ $zone->get_id() ]['formatted_zone_location'] = $zone->get_formatted_location(); - $zones[ $zone->get_id() ]['shipping_methods'] = $zone->get_shipping_methods(); + $zones[ $zone->get_id() ]['shipping_methods'] = $zone->get_shipping_methods( false, 'json' ); } return $zones;