WordPress at Your Fingertips
function is not described

WC_Shipping_Legacy_Local_Pickup::calculate_shipping() public WC 1.0

Calculate shipping.

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

No Hooks.

Return

null. Nothing.

Usage

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

Code of WC_Shipping_Legacy_Local_Pickup::calculate_shipping() WC 5.9.0

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