From dbeabd5b0913ecd76f29658be182f031765554c6 Mon Sep 17 00:00:00 2001 From: Gerhard Date: Mon, 19 Nov 2018 13:04:58 +0200 Subject: [PATCH] Add woocommerce_valid_location_types filter --- includes/class-wc-shipping-zone.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/class-wc-shipping-zone.php b/includes/class-wc-shipping-zone.php index cabfb93739b..a2f201bc197 100644 --- a/includes/class-wc-shipping-zone.php +++ b/includes/class-wc-shipping-zone.php @@ -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 ); } /**