WC_Shipping_Free_Shipping::calculate_shipping()publicWC 1.0

{} Это метод класса: WC_Shipping_Free_Shipping{}

Хуков нет.

Возвращает

null. Ничего.

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

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

Код WC_Shipping_Free_Shipping::calculate_shipping() WC 6.4.1

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