Add woocommerce_valid_location_types filter

This commit is contained in:
Gerhard 2018-11-19 13:04:58 +02:00
parent 8f145c70d7
commit dbeabd5b09
1 changed files with 1 additions and 1 deletions

View File

@ -334,7 +334,7 @@ class WC_Shipping_Zone extends WC_Legacy_Shipping_Zone {
* @return boolean
*/
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 );
}
/**