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