WC_Shipping_Zone::set_locations()
Set locations.
Method of the class: WC_Shipping_Zone{}
No Hooks.
Return
null
. Nothing (null).
Usage
$WC_Shipping_Zone = new WC_Shipping_Zone(); $WC_Shipping_Zone->set_locations( $locations );
- $locations(array)
- Array of locations.
Default: array()
WC_Shipping_Zone::set_locations() WC Shipping Zone::set locations code WC 9.4.2
public function set_locations( $locations = array() ) { $this->clear_locations(); foreach ( $locations as $location ) { $this->add_location( $location['code'], $location['type'] ); } }