WordPress at Your Fingertips
function is not described

WC_Legacy_Shipping_Zone::read() public WC 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.

{} It's a method of the class: WC_Legacy_Shipping_Zone{}

No Hooks.


null. Nothing.


$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.

Code of WC_Legacy_Shipping_Zone::read() WC 6.1.1

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 );