woocommerce_get_zone_criteria
Get shipping zone criteria
Использование
add_filter( 'woocommerce_get_zone_criteria', 'wp_kama_woocommerce_get_zone_criteria_filter', 10, 3 );
/**
* Function for `woocommerce_get_zone_criteria` filter-hook.
*
* @param array $criteria Get zone criteria.
* @param array $package Package information.
* @param array $postcode_locations Postcode range and wildcard matching.
*
* @return array
*/
function wp_kama_woocommerce_get_zone_criteria_filter( $criteria, $package, $postcode_locations ){
// filter...
return $criteria;
}
- $criteria(массив)
- Get zone criteria.
- $package(массив)
- Package information.
- $postcode_locations(массив)
- Postcode range and wildcard matching.
Список изменений
| С версии 3.6.6 | Введена. |
Где вызывается хук
woocommerce_get_zone_criteria
woocommerce/includes/data-stores/class-wc-shipping-zone-data-store.php 341
$criteria = apply_filters( 'woocommerce_get_zone_criteria', $criteria, $package, $postcode_locations );