Automattic\WooCommerce\Admin\Features\Blueprint\Exporters
ExportWCShipping::get_steps_for_locations
Retrieve shipping zone locations.
Method of the class: ExportWCShipping{}
No Hooks.
Returns
Array
. Steps for shipping zone locations.
Usage
// private - for code of main (parent) class only $result = $this->get_steps_for_locations(): array;
ExportWCShipping::get_steps_for_locations() ExportWCShipping::get steps for locations code WC 9.8.5
private function get_steps_for_locations(): array { global $wpdb; return array_map( fn( $location ) => new RunSql( Util::array_to_insert_sql( $location, $wpdb->prefix . 'woocommerce_shipping_zone_locations', 'replace into' ) ), $wpdb->get_results( "SELECT * FROM {$wpdb->prefix}woocommerce_shipping_zone_locations", ARRAY_A ) ); }