WC_Legacy_Shipping_Zone::read()publicWC 1.0

Deprecated from version 3.0.0 - Init a shipping zone with an ID.. It is no longer supported and can be removed in future releases. It is recommended to replace this function with the same one.

Read a shipping zone by ID.

Method of the class: WC_Legacy_Shipping_Zone{}

No Hooks.


null. Nothing (null).


$WC_Legacy_Shipping_Zone = new WC_Legacy_Shipping_Zone();
$WC_Legacy_Shipping_Zone->read( $zone_id );
$zone_id(int) (required)


Deprecated since 3.0.0 - Init a shipping zone with an ID.

WC_Legacy_Shipping_Zone::read() code WC 8.9.0

public function read( $zone_id ) {
	wc_deprecated_function( 'WC_Shipping_Zone::read', '3.0', 'a shipping zone initialized with an ID.' );
	$this->set_id( $zone_id );
	$data_store = WC_Data_Store::load( 'shipping-zone' );
	$data_store->read( $this );