WC_Shipping_Local_Pickup::calculate_shipping()publicWC 1.0

Calculate local pickup shipping.

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

Хуков нет.

Возвращает

null. Ничего.

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

$WC_Shipping_Local_Pickup = new WC_Shipping_Local_Pickup();
$WC_Shipping_Local_Pickup->calculate_shipping( $package );
$package(массив)
Package information.
По умолчанию: array()

Код WC_Shipping_Local_Pickup::calculate_shipping() WC 7.3.0

public function calculate_shipping( $package = array() ) {
	$this->add_rate(
		array(
			'label'   => $this->title,
			'package' => $package,
			'cost'    => $this->cost,
		)
	);
}