WordPress at Your Fingertips
function is not described

WC_Shipping_Free_Shipping::calculate_shipping() public WC 1.0

Called to calculate shipping rates for this method. Rates can be added using the add_rate() method.

{} It's a method of the class: WC_Shipping_Free_Shipping{}

No Hooks.

Return

null. Nothing.

Usage

$WC_Shipping_Free_Shipping = new WC_Shipping_Free_Shipping();
$WC_Shipping_Free_Shipping->calculate_shipping( $package );
$package(array)
Shipping package.
Default: array()

Code of WC_Shipping_Free_Shipping::calculate_shipping() WC 5.9.0

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