WC_Shipping_Rate::set_instance_id()publicWC 3.2.0

Set instance ID the rate belongs to.

Method of the class: WC_Shipping_Rate{}

No Hooks.

Return

null. Nothing (null).

Usage

$WC_Shipping_Rate = new WC_Shipping_Rate();
$WC_Shipping_Rate->set_instance_id( $instance_id );
$instance_id(int) (required)
Instance ID.

Changelog

Since 3.2.0 Introduced.

WC_Shipping_Rate::set_instance_id() code WC 9.3.3

public function set_instance_id( $instance_id ) {
	$this->data['instance_id'] = absint( $instance_id );
}