WC_Settings_Shipping::zones_screen()protectedWC 1.0

Show zones

Метод класса: WC_Settings_Shipping{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->zones_screen();

Код WC_Settings_Shipping::zones_screen() WC 8.7.0

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';
}