WordPress at Your Fingertips
function is not described

WC_Shipping_Rate::__construct() public WC 1.0

Constructor.

{} 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->__construct( $id, $label, $cost, $taxes, $method_id, $instance_id );
$id(string)
Shipping rate ID.
Default: ''
$label(string)
Shipping rate label.
Default: ''
$cost(int)
Cost.
$taxes(array)
Taxes applied to shipping rate.
Default: array()
$method_id(string)
Shipping method ID.
Default: ''
$instance_id(int)
Shipping instance ID.

Code of WC_Shipping_Rate::__construct() WC 5.7.0

public function __construct( $id = '', $label = '', $cost = 0, $taxes = array(), $method_id = '', $instance_id = 0 ) {
	$this->set_id( $id );
	$this->set_label( $label );
	$this->set_cost( $cost );
	$this->set_taxes( $taxes );
	$this->set_method_id( $method_id );
	$this->set_instance_id( $instance_id );
}