woocommerce_valid_location_types filter-hookWC 1.0

Is passed location type valid?

Usage

add_filter( 'woocommerce_valid_location_types', 'wp_kama_woocommerce_valid_location_types_filter' );

/**
 * Function for `woocommerce_valid_location_types` filter-hook.
 * 
 * @param string $type Type to check.
 *
 * @return string
 */
function wp_kama_woocommerce_valid_location_types_filter( $type ){

	// filter...
	return $type;
}
$type(string)
Type to check.

Where the hook is called

WC_Shipping_Zone::is_valid_location_type()
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 );

Where the hook is used in WooCommerce

Usage not found.