diff --git a/includes/class-wc-shipping-zones.php b/includes/class-wc-shipping-zones.php index 2dd14acc52d..5ee0407d129 100644 --- a/includes/class-wc-shipping-zones.php +++ b/includes/class-wc-shipping-zones.php @@ -1,25 +1,27 @@ get_id() ] = $zone->get_data(); $zones[ $zone->get_id() ]['zone_id'] = $zone->get_id(); $zones[ $zone->get_id() ]['formatted_zone_location'] = $zone->get_formatted_location(); @@ -39,8 +41,9 @@ class WC_Shipping_Zones { /** * Get shipping zone using it's ID + * * @since 2.6.0 - * @param int $zone_id + * @param int $zone_id Zone ID. * @return WC_Shipping_Zone|bool */ public static function get_zone( $zone_id ) { @@ -49,22 +52,23 @@ class WC_Shipping_Zones { /** * Get shipping zone by an ID. + * * @since 2.6.0 - * @param string $by zone_id or instance_id - * @param int $id + * @param string $by Get by 'zone_id' or 'instance_id'. + * @param int $id ID. * @return WC_Shipping_Zone|bool */ public static function get_zone_by( $by = 'zone_id', $id = 0 ) { $zone_id = false; switch ( $by ) { - case 'zone_id' : + case 'zone_id': $zone_id = $id; - break; - case 'instance_id' : + break; + case 'instance_id': $data_store = WC_Data_Store::load( 'shipping-zone' ); $zone_id = $data_store->get_zone_id_by_instance_id( $id ); - break; + break; } if ( false !== $zone_id ) { @@ -79,11 +83,10 @@ class WC_Shipping_Zones { } /** - * Get shipping zone using it's ID + * Get shipping zone using it's ID. + * * @since 2.6.0 - * - * @param $instance_id - * + * @param int $instance_id Instance ID. * @return bool|WC_Shipping_Method */ public static function get_shipping_method( $instance_id ) { @@ -104,7 +107,8 @@ class WC_Shipping_Zones { /** * Delete a zone using it's ID - * @param int $zone_id + * + * @param int $zone_id Zone ID. * @since 2.6.0 */ public static function delete_zone( $zone_id ) { @@ -114,9 +118,10 @@ class WC_Shipping_Zones { /** * Find a matching zone for a given package. + * * @since 2.6.0 * @uses wc_make_numeric_postcode() - * @param object $package + * @param array $package Shipping package. * @return WC_Shipping_Zone */ public static function get_zone_matching_package( $package ) {