WC_Shipping_Rate::set_method_id
Set shipping method ID the rate belongs to.
Method of the class: WC_Shipping_Rate{}
No Hooks.
Returns
null. Nothing (null).
Usage
$WC_Shipping_Rate = new WC_Shipping_Rate(); $WC_Shipping_Rate->set_method_id( $method_id );
- $method_id(string) (required)
- Shipping method ID.
Changelog
| Since 3.2.0 | Introduced. |
WC_Shipping_Rate::set_method_id() WC Shipping Rate::set method id code WC 10.3.6
public function set_method_id( $method_id ) {
$this->data['method_id'] = (string) $method_id;
}