woocommerce_valid_location_types хук-фильтр . WC 1.0
Is passed location type valid?
Использование
add_filter( 'woocommerce_valid_location_types', 'filter_function_name_4477' ); function filter_function_name_4477( $type ){ // filter... return $type; }
- $type(строка)
- Type to check.
Где вызывается хук
woocommerce_valid_location_types
woocommerce/includes/class-wc-shipping-zone.php 354
return in_array( $type, apply_filters( 'woocommerce_valid_location_types', array( 'postcode', 'state', 'country', 'continent' ) ), true );