WordPress at Your Fingertips
function is not described

WC_Legacy_Shipping_Zone::update() public WC 1.0

Deprecated from version 3.0.0. It is no longer supported and can be removed in future releases. Use ::save instead.

Update a zone.

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

No Hooks.

Return

null. Nothing.

Usage

$WC_Legacy_Shipping_Zone = new WC_Legacy_Shipping_Zone();
$WC_Legacy_Shipping_Zone->update();

Changelog

Deprecated Since 3.0.0 - Use ::save instead.

Code of WC_Legacy_Shipping_Zone::update() WC 5.7.1

public function update() {
	wc_deprecated_function( 'WC_Shipping_Zone::update', '3.0', 'WC_Shipping_Zone::save instead.' );
	$data_store = WC_Data_Store::load( 'shipping-zone' );
	try {
		$data_store->update( $this );
	} catch ( Exception $e ) {
		return false;
	}
}