WordPress filter hook
woocommerce_shipping_package_name
Defined by WooCommerce and fired by 21 plugins in total, running on 7.3M+ sites between them.
“Filters the shipping package name.”
How to use woocommerce_shipping_package_name
It's a filter: your callback receives the value and 2 more arguments, and must return the (changed) value.
Add this to your theme's functions.php or a small custom plugin:
add_filter( 'woocommerce_shipping_package_name', function( $value, $i, $package ) {
// Change $value here.
return $value;
}, 10, 3 );Argument names come from WCFM's source. Other plugins may pass different values: check the call in the plugin you're targeting below.
21 plugins that fire woocommerce_shipping_package_name
Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.
-
WooCommerce7+ million installs
apply_filters( 'woocommerce_shipping_package_name', $shipping_package_name, $package['package_id'], $package, $total_packages )includes/class-wc-cart.php:1841 -
CartFlows200,000+ installs
apply_filters( 'woocommerce_shipping_package_name', ( ( $i + 1 ) > 1 ) ? sprintf( _x( 'Shipping %d', 'shipping packages', 'cartflows' ), ( $i + 1 ) ) : _x( 'Shipping', 'shipping packages', 'cartflows' ), $i, $package )modules/checkout/classes/layouts/class-cartflows-instant-checkout.php:509 -
FunnelKit30,000+ installs
apply_filters( 'woocommerce_shipping_package_name', ( ( $i + 1 ) > 1 ) ? sprintf( __( 'Shipping %d', 'woocommerce' ), ( $i + 1 ) ) : __( 'Shipping', 'woocommerce' ), $i, $package )modules/checkouts/includes/class-wfacp-common-helper.php:604 -
Fluid Checkout for WooCommerce20,000+ installs
apply_filters( 'woocommerce_shipping_package_name', ( ( $package_index + 1 ) > 1 ) ? sprintf( _x( 'Shipping %d', 'shipping packages', 'fluid-checkout' ), ( $package_index + 1 ) ) : _x( 'Shipping', 'shipping packages', 'fluid-checkout' ), $package_index, $package )inc/checkout-steps.php:8965 -
E2Pdf10,000+ installs
apply_filters( 'woocommerce_shipping_package_name', (($i + 1) > 1) ? sprintf(_x('Shipping %d', 'shipping packages', 'woocommerce'), ($i + 1)) : _x('Shipping', 'shipping packages', 'woocommerce'), $i, $package )classes/model/e2pdf-shortcode.php:6041 -
SellKit7,000+ installs
apply_filters( 'woocommerce_shipping_package_name', ( ( $index + 1 ) > 1 ) ? sprintf( _x( 'Shipping %d', 'shipping packages', 'sellkit' ), $index + 1 ) : _x( 'Shipping', 'shipping packages', 'sellkit' ), $index, $package )includes/block-editor/blocks/checkout/helper.php:2533 -
WPFunnels5,000+ installs
apply_filters( 'woocommerce_shipping_package_name', ( ( $i + 1 ) > 1 ) ? sprintf( _x( 'Shipping %d', 'shipping packages', 'wpfnl' ), ( $i + 1 ) ) : _x( 'Shipping', 'shipping packages', 'wpfnl' ), $i, $package )public/modules/checkout/templates/checkout/shipping-methods.php:17 -
Addonify Floating Cart For WooCommerce1,000+ installs
apply_filters( 'woocommerce_shipping_package_name', ( ( $i + 1 ) > 1 ) ? sprintf( _x( 'Shipping %d', 'shipping packages', 'addonify-floating-cart' ), ( $i + 1 ) ) : _x( 'Shipping', 'shipping packages', 'addonify-floating-cart' ), $i, $package )includes/template-functions.php:362 -
WCFM1,000+ installs
apply_filters( 'woocommerce_shipping_package_name', ( ( $i + 1 ) > 1 ) ? sprintf( _x( 'Shipping %d', 'shipping packages', 'woocommerce' ), ( $i + 1 ) ) : _x( 'Shipping', 'shipping packages', 'woocommerce' ), $i, $package )includes/api/class-api-wc_cart-controller.php:240 -
WowShipping700+ installs
apply_filters( 'woocommerce_shipping_package_name', sprintf( __( 'Shipping %d', 'wow-table-rate-shipping' ), count( $packages ) + 1 ), $key, $package )includes/simulator/class-checkout-simulator.php:264 -
PeachPay300+ installs
apply_filters( 'woocommerce_shipping_package_name', __( 'Shipping', 'peachpay-for-woocommerce' ), $package_index, $package )core/util/cart.php:227 -
Shopready100+ installs
apply_filters( 'woocommerce_shipping_package_name', (($i + 1) > 1) ? sprintf(_x('Shipping %d', 'shipping packages', 'shopready-elementor-addon'), ($i + 1)) : _x('Shipping', 'shipping packages', 'shopready-elementor-addon'), $i, $package )src/extension/elewidgets/helper/general.php:241 -
Taqnix30+ installs
apply_filters( 'woocommerce_shipping_package_name', sprintf('Shipping %d', 'Shipping %d', ((int)$i + 1), 'shipping packages', ((int)$i + 1)), $i, $package )public/class-taqnix-checkout.php:316 -
Radin app10+ installs
apply_filters( 'woocommerce_shipping_package_name', ( ( $i + 1 ) > 1 ) ? sprintf( _x( 'Shipping %d', 'shipping packages', 'woocommerce' ), ( $i + 1 ) ) : _x( 'Shipping', 'shipping packages', 'woocommerce' ), $i, $package )includes/API/Controller/PaymentMethodControllerRadinapp.php:95 -
TrafficFlow OnePageCheckout for WooCommerce10+ installs
apply_filters( 'woocommerce_shipping_package_name', sprintf( __( 'Shipment %d', 'trafficflow-onepagecheckout' ), $opcw_i + 1 ), $opcw_i, $opcw_package )templates/part-shipping.php:36 -
Subscriptions & Recurring Payments for WooCommerce10+ installs
apply_filters( 'woocommerce_shipping_package_name', sprintf( _n( 'Shipping', 'Shipping %d', ( $i + 1 ), 'subscriptions-recurring-payments-for-woocommerce' ), ( $i + 1 ) ), $i, $package )inc/inependent-functions/awc-cart-functions.php:119 -
WPC10+ installs
apply_filters( 'woocommerce_shipping_package_name', sprintf( _nx( 'Shipping', 'Shipping %d', ( $i + 1 ), 'shipping packages', 'woocommerce' ), ( $i + 1 ) ), $i, $package )app/inc/Addons/wpc-onepage-checkout/inc/template-functions.php:47 -
Flexible PickupFewer than 10 installs
apply_filters( 'woocommerce_shipping_package_name', sprintf(_n('Shipping', 'Shipping %d', ($key + 1), 'flexible-pickup'), ($key + 1)), $key, $package )classes/class-flexible-pickup.php:374 -
Checkoutify LiteFewer than 10 installs
apply_filters( 'woocommerce_shipping_package_name', ((($i + 1) > 1) ? sprintf(_x('Shipping %d', 'shipping packages', 'checkoutify-lite'), ($i + 1)) : _x('Shipping', 'shipping packages', 'checkoutify-lite')), $i, $package )custom-checkout-plugin.php:249 -
SKYRO Checkout for WooCommerceFewer than 10 installs
apply_filters( 'woocommerce_shipping_package_name', ( ( $i + 1 ) > 1 ) ? sprintf( _x( 'Shipping %d', 'shipping packages', 'skyro-checkout-for-woocommerce' ), ( $i + 1 ) ) : _x( 'Shipping', 'shipping packages', 'skyro-checkout-for-woocommerce' ), $i, $package )src/FrontEnd/TemplateFiles/Credence/Credence.php:175 -
Aiolos Checkout for WooCommerceFewer than 10 installs
apply_filters( 'woocommerce_shipping_package_name', ( ( (int) $aiolos_index + 1 ) > 1 ) ? sprintf( _x( 'Shipping %d', 'shipping packages', 'woocommerce' ), ( (int) $aiolos_index + 1 ) ) : _x( 'Shipping', 'shipping packages', 'woocommerce' ), $aiolos_index, $aiolos_package )templates/checkout/shipping-methods.php:49
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.