WC_Shipping_Zones::zone_has_postcode_locations
Check whether a zone has postcode locations.
Method of the class: WC_Shipping_Zones{}
No Hooks.
Returns
bool. Whether the zone has postcode locations.
Usage
$result = WC_Shipping_Zones::zone_has_postcode_locations( $zone );
- $zone(array) (required)
- Shipping zone.
Changelog
| Since 11.1.0 | Introduced. |
WC_Shipping_Zones::zone_has_postcode_locations() WC Shipping Zones::zone has postcode locations code WC 11.1.2
private static function zone_has_postcode_locations( $zone ) {
return ! empty( self::get_zone_locations_by_type( $zone, array( 'postcode' ) ) );
}