WordPress filter hook

woocommerce_shipping_package_details_array

Defined by WooCommerce and fired by 18 plugins in total, running on 7.3M+ sites between them.

How to use woocommerce_shipping_package_details_array

It's a filter: your callback receives the value and 1 more argument, and must return the (changed) value. Add this to your theme's functions.php or a small custom plugin:

functions.php
add_filter( 'woocommerce_shipping_package_details_array', function( $product_names, $package ) {
	// Change $product_names here.
	return $product_names;
}, 10, 2 );

Argument names come from WooCommerce's source. Other plugins may pass different values: check the call in the plugin you're targeting below.

18 plugins that fire woocommerce_shipping_package_details_array

Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.

  1. WooCommerce icon WooCommerce7+ million installs apply_filters( 'woocommerce_shipping_package_details_array', $product_names, $package ) includes/wc-cart-functions.php:263
  2. CartFlows icon CartFlows200,000+ installs apply_filters( 'woocommerce_shipping_package_details_array', $product_names, $package ) modules/checkout/classes/class-cartflows-checkout-markup.php:2284
  3. FunnelKit icon FunnelKit30,000+ installs apply_filters( 'woocommerce_shipping_package_details_array', $product_names, $package ) modules/checkouts/includes/class-wfacp-common-helper.php:592
  4. Fluid Checkout for WooCommerce icon Fluid Checkout for WooCommerce20,000+ installs apply_filters( 'woocommerce_shipping_package_details_array', $product_names, $package ) inc/checkout-steps.php:6329
  5. E2Pdf icon E2Pdf10,000+ installs apply_filters( 'woocommerce_shipping_package_details_array', $product_names, $package ) classes/model/e2pdf-shortcode.php:6034
  6. SellKit icon SellKit7,000+ installs apply_filters( 'woocommerce_shipping_package_details_array', $product_names, $package ) includes/block-editor/blocks/checkout/inner-blocks/cart-shipping/class.php:90
  7. ThemeHunk icon ThemeHunk5,000+ installs apply_filters( 'woocommerce_shipping_package_details_array', $product_names, $package ) inc/taiowc-markup.php:1138
  8. WPFunnels icon WPFunnels5,000+ installs apply_filters( 'woocommerce_shipping_package_details_array', $product_names, $package ) public/modules/checkout/class-wpfnl-checkout.php:2854
  9. Addonify Floating Cart For WooCommerce icon Addonify Floating Cart For WooCommerce1,000+ installs apply_filters( 'woocommerce_shipping_package_details_array', $product_names, $package ) includes/template-functions.php:352
  10. Flexible Subscriptions icon Flexible Subscriptions1,000+ installs apply_filters( 'woocommerce_shipping_package_details_array', $product_names, $package ) src/Subscription/Proposal/RecurringShippingResolver.php:39
  11. WCFM icon WCFM1,000+ installs apply_filters( 'woocommerce_shipping_package_details_array', $product_names, $package ) includes/api/class-api-wc_cart-controller.php:215
  12. Shopready icon Shopready100+ installs apply_filters( 'woocommerce_shipping_package_details_array', $product_names, $package ) src/extension/elewidgets/helper/general.php:229
  13. Taqnix icon Taqnix30+ installs apply_filters( 'woocommerce_shipping_package_details_array', $product_names, $package ) public/class-taqnix-checkout.php:295
  14. Radin app icon Radin app10+ installs apply_filters( 'woocommerce_shipping_package_details_array', $product_names, $package ) includes/API/Controller/PaymentMethodControllerRadinapp.php:86
  15. WPC icon WPC10+ installs apply_filters( 'woocommerce_shipping_package_details_array', $product_names, $package ) app/inc/Addons/wpc-onepage-checkout/inc/template-functions.php:38
  16. Checkoutify Lite icon Checkoutify LiteFewer than 10 installs apply_filters( 'woocommerce_shipping_package_details_array', $product_names, $package ) custom-checkout-plugin.php:243
  17. YayCheckout icon YayCheckoutFewer than 10 installs apply_filters( 'woocommerce_shipping_package_details_array', $product_names, $package ) includes/Renderer/CheckoutFragments.php:701
  18. SKYRO Checkout for WooCommerce icon SKYRO Checkout for WooCommerceFewer than 10 installs apply_filters( 'woocommerce_shipping_package_details_array', $product_names, $package ) src/FrontEnd/TemplateFiles/Credence/Credence.php:163

Need a customisation built on this hook?

Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.