WC_Shipping_Free_Shipping::calculate_shipping( array $package = array() )

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


Description Description


Parameters Parameters

$package

(Optional) Shipping package.

Default value: array()


Top ↑

Source Source

File: includes/shipping/free-shipping/class-wc-shipping-free-shipping.php

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

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.