WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

WC_Settings_Shipping::zone_methods_screen() protected WC 1.0

Show method for a zone

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

Хуков нет.

Возвращает

Null. Ничего.

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

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->zone_methods_screen( $zone_id );
$zone_id(число) (обязательный)
Zone ID.

Код WC_Settings_Shipping::zone_methods_screen() WC 4.5.2

woocommerce/includes/admin/settings/class-wc-settings-shipping.php
<?php
protected function zone_methods_screen( $zone_id ) {
	if ( 'new' === $zone_id ) {
		$zone = new WC_Shipping_Zone();
	} else {
		$zone = WC_Shipping_Zones::get_zone( absint( $zone_id ) );
	}

	if ( ! $zone ) {
		wp_die( esc_html__( 'Zone does not exist!', 'woocommerce' ) );
	}

	$allowed_countries   = WC()->countries->get_shipping_countries();
	$shipping_continents = WC()->countries->get_shipping_continents();

	// Prepare locations.
	$locations = array();
	$postcodes = array();

	foreach ( $zone->get_zone_locations() as $location ) {
		if ( 'postcode' === $location->type ) {
			$postcodes[] = $location->code;
		} else {
			$locations[] = $location->type . ':' . $location->code;
		}
	}

	wp_localize_script(
		'wc-shipping-zone-methods',
		'shippingZoneMethodsLocalizeScript',
		array(
			'methods'                 => $zone->get_shipping_methods( false, 'json' ),
			'zone_name'               => $zone->get_zone_name(),
			'zone_id'                 => $zone->get_id(),
			'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' ),
				'save_changes_prompt'     => __( 'Do you wish to save your changes first? Your changed data will be discarded if you choose to cancel.', 'woocommerce' ),
				'save_failed'             => __( 'Your changes were not saved. Please retry.', 'woocommerce' ),
				'add_method_failed'       => __( 'Shipping method could not be added. Please retry.', 'woocommerce' ),
				'yes'                     => __( 'Yes', 'woocommerce' ),
				'no'                      => __( 'No', 'woocommerce' ),
				'default_zone_name'       => __( 'Zone', 'woocommerce' ),
			),
		)
	);
	wp_enqueue_script( 'wc-shipping-zone-methods' );

	include_once dirname( __FILE__ ) . '/views/html-admin-page-shipping-zone-methods.php';
}