WC_Shipping_Zone_Data_Store::get_zones()
Return an ordered list of zones.
Method of the class: WC_Shipping_Zone_Data_Store{}
No Hooks.
Return
Array
. An array of objects containing a zone_id, zone_name, and zone_order.
Usage
$WC_Shipping_Zone_Data_Store = new WC_Shipping_Zone_Data_Store(); $WC_Shipping_Zone_Data_Store->get_zones();
Changelog
Since 3.0.0 | Introduced. |
WC_Shipping_Zone_Data_Store::get_zones() WC Shipping Zone Data Store::get zones code WC 9.4.2
public function get_zones() { global $wpdb; return $wpdb->get_results( "SELECT zone_id, zone_name, zone_order FROM {$wpdb->prefix}woocommerce_shipping_zones order by zone_order ASC, zone_id ASC;" ); }