PHP Class WC_Shipping_Zones

Since: 2.6.0
Author: WooThemes
Afficher le fichier Open project: woocommerce/woocommerce Class Usage Examples

Méthodes publiques

Méthode Description
delete_zone ( integer $zone_id ) Delete a zone using it's ID
get_shipping_method ( $instance_id ) : WC_Shipping_Meethod | boolean Get shipping zone using it's ID
get_zone ( integer $zone_id ) : WC_Shipping_Zone | boolean Get shipping zone using it's ID
get_zone_by ( string $by = 'zone_id', integer $id ) : WC_Shipping_Zone | boolean Get shipping zone by an ID.
get_zone_matching_package ( object $package ) : WC_Shipping_Zone Find a matching zone for a given package.
get_zones ( ) : array Get shipping zones from the database

Method Details

delete_zone() public static méthode

Delete a zone using it's ID
Since: 2.6.0
public static delete_zone ( integer $zone_id )
$zone_id integer

get_shipping_method() public static méthode

Get shipping zone using it's ID
Since: 2.6.0
public static get_shipping_method ( $instance_id ) : WC_Shipping_Meethod | boolean
Résultat WC_Shipping_Meethod | boolean

get_zone() public static méthode

Get shipping zone using it's ID
Since: 2.6.0
public static get_zone ( integer $zone_id ) : WC_Shipping_Zone | boolean
$zone_id integer
Résultat WC_Shipping_Zone | boolean

get_zone_by() public static méthode

Get shipping zone by an ID.
Since: 2.6.0
public static get_zone_by ( string $by = 'zone_id', integer $id ) : WC_Shipping_Zone | boolean
$by string zone_id or instance_id
$id integer
Résultat WC_Shipping_Zone | boolean

get_zone_matching_package() public static méthode

Find a matching zone for a given package.
Since: 2.6.0
public static get_zone_matching_package ( object $package ) : WC_Shipping_Zone
$package object
Résultat WC_Shipping_Zone

get_zones() public static méthode

Get shipping zones from the database
Since: 2.6.0
public static get_zones ( ) : array
Résultat array of arrays