woocommerce_get_zone_criteria

woocommerce_get_zone_criteria

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: woocommerce.9.3.3

apply_filters('woocommerce_get_zone_criteria') is found 1 times:

  • /includes/data-stores/class-wc-shipping-zone-data-store.php line 286
    		 * @param array $criteria Get zone criteria.
    		 * @param array $package Package information.
    		 * @param array $postcode_locations Postcode range and wildcard matching.
    		 */
    		$criteria = apply_filters( 'woocommerce_get_zone_criteria', $criteria, $package, $postcode_locations );
    
    		// Get matching zones.
    		return $wpdb->get_var(
    			"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