WordPress at Your Fingertips
function is not described

WC_Shipping_Local_Pickup::calculate_shipping() public WC 1.0

Calculate local pickup shipping.

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

No Hooks.

Return

null. Nothing.

Usage

$WC_Shipping_Local_Pickup = new WC_Shipping_Local_Pickup();
$WC_Shipping_Local_Pickup->calculate_shipping( $package );
$package(array)
Package information.
Default: array()

Code of WC_Shipping_Local_Pickup::calculate_shipping() WC 5.9.0

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