WC_Shipping_Rate::__construct()publicWC 1.0

Constructor.

Method of the class: WC_Shipping_Rate{}

No Hooks.

Return

null. Nothing (null).

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.

WC_Shipping_Rate::__construct() code WC 9.4.2

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 );
}