WC_Shipping_Rate::set_costpublicWC 3.2.0

Set rate cost.

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_cost( $cost );
$cost(string) (required)
Shipping rate cost.

Changelog

Since 3.2.0 Introduced.

WC_Shipping_Rate::set_cost() code WC 10.3.3

public function set_cost( $cost ) {
	$this->data['cost'] = $cost;
}