WordPress at Your Fingertips
function is not described

WC_Shipping_Rate::set_id() public WC 3.2.0

Set ID for the rate. This is usually a combination of the method and instance IDs.

{} 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_id( $id );
$id(string) (required)
Shipping rate ID.

Changelog

Since 3.2.0 Introduced.

Code of WC_Shipping_Rate::set_id() WC 5.6.0

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