get_id(); } /** * Read a shipping zone by ID. * @deprecated 2.7.0 - Init a shipping zone with an ID. */ public function read( $zone_id ) { //wc_soft_deprecated_function( 'WC_Shipping_Zone::read', '2.7', '2.8', 'Init a shipping zone with an ID.' ); $this->set_id( $zone_id ); $data_store = WC_Data_Store::load( 'shipping-zone' ); $data_store->read( $this ); } /** * Update a zone. * @deprecated 2.7.0 - Use ::save instead. */ public function update() { //wc_soft_deprecated_function( 'WC_Shipping_Zone::update', '2.7', '2.8', 'Use ::save instead.' ); $data_store = WC_Data_Store::load( 'shipping-zone' ); try { $data_store->update( $this ); } catch ( Exception $e ) { return false; } } /** * Create a zone. * @deprecated 2.7.0 - Use ::save instead. */ public function create() { //wc_soft_deprecated_function( 'WC_Shipping_Zone::create', '2.7', '2.8', 'Use ::save instead.' ); $data_store = WC_Data_Store::load( 'shipping-zone' ); try { $data_store->create( $this ); } catch ( Exception $e ) { return false; } } }