Skip to content

Instantly share code, notes, and snippets.

@Longkt
Last active April 24, 2018 15:57
Show Gist options
  • Save Longkt/92347e1828e4c6dcde314eae1ae4b603 to your computer and use it in GitHub Desktop.
Save Longkt/92347e1828e4c6dcde314eae1ae4b603 to your computer and use it in GitHub Desktop.
<?php
global $wpdb;
$location_zone = $wpdb->get_results(
"
SELECT {$wpdb->prefix}woocommerce_shipping_zone_locations.location_code, {$wpdb->prefix}woocommerce_shipping_zone_methods.instance_id
FROM {$wpdb->prefix}woocommerce_shipping_zone_locations
INNER JOIN {$wpdb->prefix}woocommerce_shipping_zone_methods
ON {$wpdb->prefix}woocommerce_shipping_zone_locations.zone_id = {$wpdb->prefix}woocommerce_shipping_zone_methods.zone_id
"
, ARRAY_A );
echo "<pre>";
print_r($location_zone);
echo "</pre>";
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment