WordPress at Your Fingertips
function is not described

WC_Shipping_Rate::set_method_id() public WC 3.2.0

Set shipping method ID the rate belongs to.

{} It's a method of the class: WC_Shipping_Rate{}

No Hooks.

Return

null. Nothing.

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.

Code of WC_Shipping_Rate::set_method_id() WC 5.6.0

public function set_method_id( $method_id ) {
	$this->data['method_id'] = (string) $method_id;
}