Fix matching zones query for working with sqlite
And probably other databases too.
This commit is contained in:
parent
5f0badbdf7
commit
07eef2d717
|
@ -282,7 +282,7 @@ class WC_Shipping_Zone_Data_Store extends WC_Data_Store_WP implements WC_Shippin
|
|||
"SELECT zones.zone_id FROM {$wpdb->prefix}woocommerce_shipping_zones as zones
|
||||
LEFT OUTER JOIN {$wpdb->prefix}woocommerce_shipping_zone_locations as locations ON zones.zone_id = locations.zone_id AND location_type != 'postcode'
|
||||
WHERE " . implode( ' ', $criteria ) // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
|
||||
. ' ORDER BY zone_order ASC, zone_id ASC LIMIT 1'
|
||||
. ' ORDER BY zone_order ASC, zones.zone_id ASC LIMIT 1'
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue