Add woocommerce_valid_location_types filter
This commit is contained in:
parent
8f145c70d7
commit
dbeabd5b09
|
@ -334,7 +334,7 @@ class WC_Shipping_Zone extends WC_Legacy_Shipping_Zone {
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
public function is_valid_location_type( $type ) {
|
public function is_valid_location_type( $type ) {
|
||||||
return in_array( $type, array( 'postcode', 'state', 'country', 'continent' ), true );
|
return in_array( $type, apply_filters( 'woocommerce_valid_location_types', array( 'postcode', 'state', 'country', 'continent' ) ), true );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue