WC_Cart::get_chosen_shipping_methods
Given a set of packages with rates, get the chosen ones only.
Method of the class: WC_Cart{}
No Hooks.
Returns
Array.
Usage
// protected - for code of main (parent) or child class $result = $this->get_chosen_shipping_methods( $calculated_shipping_packages );
- $calculated_shipping_packages(array)
- Array of packages.
Default:array()
Changelog
| Since 3.2.0 | Introduced. |
WC_Cart::get_chosen_shipping_methods() WC Cart::get chosen shipping methods code WC 10.7.0
protected function get_chosen_shipping_methods( $calculated_shipping_packages = array() ) {
return ShippingUtil::get_selected_shipping_rates_from_packages( $calculated_shipping_packages );
}