WC_Shipping_Zone_Data_Store::get_zone_id_by_instance_id( int $id )
Return a zone ID from an instance ID.
Description Description
Parameters Parameters
- $id
-
(Required) Instnace ID.
Return Return
(int)
Source Source
File: includes/data-stores/class-wc-shipping-zone-data-store.php
public function get_zone_id_by_instance_id( $id ) { global $wpdb; return $wpdb->get_var( $wpdb->prepare( "SELECT zone_id FROM {$wpdb->prefix}woocommerce_shipping_zone_methods as methods WHERE methods.instance_id = %d LIMIT 1;", $id ) ); }
Changelog Changelog
Version | Description |
---|---|
3.0.0 | Introduced. |