get_id(); } /** * Read a shipping zone by ID. * @deprecated 3.0.0 - Init a shipping zone with an ID. */ 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 ); } /** * Update a zone. * @deprecated 3.0.0 - Use ::save instead. */ public function update() { wc_deprecated_function( 'WC_Shipping_Zone::update', '3.0', '::save instead.' ); $data_store = WC_Data_Store::load( 'shipping-zone' ); try { $data_store->update( $this ); } catch ( Exception $e ) { return false; } } /** * Create a zone. * @deprecated 3.0.0 - Use ::save instead. */ public function create() { wc_deprecated_function( 'WC_Shipping_Zone::create', '3.0', '::save instead.' ); $data_store = WC_Data_Store::load( 'shipping-zone' ); try { $data_store->create( $this ); } catch ( Exception $e ) { return false; } } }