WC_Shipping_Rate::__construct()publicWC 1.0

Constructor.

Метод класса: WC_Shipping_Rate{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

$WC_Shipping_Rate = new WC_Shipping_Rate();
$WC_Shipping_Rate->__construct( $id, $label, $cost, $taxes, $method_id, $instance_id );
$id(строка)
Shipping rate ID.
По умолчанию: ''
$label(строка)
Shipping rate label.
По умолчанию: ''
$cost(int)
Cost.
$taxes(массив)
Taxes applied to shipping rate.
По умолчанию: array()
$method_id(строка)
Shipping method ID.
По умолчанию: ''
$instance_id(int)
Shipping instance ID.

Код WC_Shipping_Rate::__construct() WC 8.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 );
}