WC_Settings_Shipping::zones_screen()
Show zones
Description Description
Source Source
File: includes/admin/settings/class-wc-settings-shipping.php
protected function zones_screen() {
$method_count = wc_get_shipping_method_count( false, true );
wp_localize_script(
'wc-shipping-zones',
'shippingZonesLocalizeScript',
array(
'zones' => WC_Shipping_Zones::get_zones( 'json' ),
'default_zone' => array(
'zone_id' => 0,
'zone_name' => '',
'zone_order' => null,
),
'wc_shipping_zones_nonce' => wp_create_nonce( 'wc_shipping_zones_nonce' ),
'strings' => array(
'unload_confirmation_msg' => __( 'Your changed data will be lost if you leave this page without saving.', 'woocommerce' ),
'delete_confirmation_msg' => __( 'Are you sure you want to delete this zone? This action cannot be undone.', 'woocommerce' ),
'save_failed' => __( 'Your changes were not saved. Please retry.', 'woocommerce' ),
'no_shipping_methods_offered' => __( 'No shipping methods offered to this zone.', 'woocommerce' ),
),
)
);
wp_enqueue_script( 'wc-shipping-zones' );
include_once dirname( __FILE__ ) . '/views/html-admin-page-shipping-zones.php';
}