WC_Shipping_Legacy_Free_Shipping::calculate_shipping()
Calculate shipping.
Method of the class: WC_Shipping_Legacy_Free_Shipping{}
No Hooks.
Return
null
. Nothing (null).
Usage
$WC_Shipping_Legacy_Free_Shipping = new WC_Shipping_Legacy_Free_Shipping(); $WC_Shipping_Legacy_Free_Shipping->calculate_shipping( $package );
- $package(array)
- Package information.
Default: array()
WC_Shipping_Legacy_Free_Shipping::calculate_shipping() WC Shipping Legacy Free Shipping::calculate shipping code WC 9.4.2
public function calculate_shipping( $package = array() ) { $args = array( 'id' => $this->id, 'label' => $this->title, 'cost' => 0, 'taxes' => false, 'package' => $package, ); $this->add_rate( $args ); }