WC_Shipping_Method::get_rates_for_package( array $package )
Return calculated rates for a package.
Description Description
Parameters Parameters
- $package
-
(Required) Package array.
Return Return
(array)
Source Source
File: includes/abstracts/abstract-wc-shipping-method.php
public function get_rates_for_package( $package ) {
$this->rates = array();
if ( $this->is_available( $package ) && ( empty( $package['ship_via'] ) || in_array( $this->id, $package['ship_via'] ) ) ) {
$this->calculate_shipping( $package );
}
return $this->rates;
}
Changelog Changelog
| Version | Description |
|---|---|
| 2.6.0 | Introduced. |