WordPress at Your Fingertips
function is not described

WC_Shipping_Rate::set_cost() public WC 3.2.0

Set rate cost.

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

Changelog

Since 3.2.0 Introduced.

Code of WC_Shipping_Rate::set_cost() WC 5.7.1

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