WordPress at Your Fingertips
function is not described

WC_Shipping_Zone_Data_Store::get_zones() public WC 3.0.0

Return an ordered list of zones.

{} It's a 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.

Code of WC_Shipping_Zone_Data_Store::get_zones() WC 5.7.0

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;" );
}