wc_get_shipping_zone()WC 2.6.0

Get the shipping zone matching a given package from the cart.

Хуков нет.

Возвращает

WC_Shipping_Zone.

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

wc_get_shipping_zone( $package );
$package(массив) (обязательный)
Shipping package.

Список изменений

С версии 2.6.0 Введена.

Код wc_get_shipping_zone() WC 8.7.0

function wc_get_shipping_zone( $package ) {
	return WC_Shipping_Zones::get_zone_matching_package( $package );
}