WooCommerce Code Reference

ShippingUtil
in package

The ShippingUtil class provides utilities for working with shipping and shipping packages.

Table of Contents

get_selected_shipping_rates_from_packages()  : array<string|int, WC_Shipping_Rate>
Get the selected shipping rates from the packages.

Methods

get_selected_shipping_rates_from_packages()

Get the selected shipping rates from the packages.

public static get_selected_shipping_rates_from_packages(array<string|int, mixed> $packages) : array<string|int, WC_Shipping_Rate>
Parameters
$packages : array<string|int, mixed>

The packages to get the selected shipping rates from.

Return values
array<string|int, WC_Shipping_Rate>The selected shipping rates.