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.
This commit is contained in:
Claudio Sanches 2018-03-12 17:37:45 -03:00
parent a6b6685353
commit 03c98e7ae7
1 changed files with 1 additions and 2 deletions

View File

@ -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;