WordPress at Your Fingertips
function is not described

WC_Shipping_Method::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_Method{}

No Hooks.


null. Nothing.


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

Code of WC_Shipping_Method::calculate_shipping() WC 5.8.0

public function calculate_shipping( $package = array() ) {}