WordPress filter hook

woocommerce_order_shipping_to_display_shipped_via

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

How to use woocommerce_order_shipping_to_display_shipped_via

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_order_shipping_to_display_shipped_via', function( $value, $order ) {
	// Change $value here.
	return $value;
}, 10, 2 );

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

5 plugins that fire woocommerce_order_shipping_to_display_shipped_via

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_order_shipping_to_display_shipped_via', ' <small class="shipped_via">' . sprintf( __( 'via %s', 'woocommerce' ), $this->get_shipping_method() ) . '</small>', $this ) includes/abstracts/abstract-wc-order.php:2958
  2. WebToffee WooCommerce PDF Invoices, Packing Slips, Delivery Notes & Shipping Labels icon WebToffee WooCommerce PDF Invoices, Packing Slips, Delivery Notes & Shipping Labels50,000+ installs apply_filters( 'woocommerce_order_shipping_to_display_shipped_via', ' <small class="shipped_via">' . sprintf( __( 'via %s', 'print-invoices-packing-slip-labels-for-woocommerce' ), $order->get_shipping_method() ) . '</small>', $order ) admin/class-wf-woocommerce-packing-list-admin.php:2432
  3. YayCurrency icon YayCurrency7,000+ installs apply_filters( 'woocommerce_order_shipping_to_display_shipped_via', ' <small class="shipped_via">' . sprintf( __( 'via %s', 'woocommerce' ), $order->get_shipping_method() ) . '</small>', $order ) includes/Engine/FEPages/WooCommerceCurrency.php:1020
  4. Payment Gateway Currency for WooCommerce icon Payment Gateway Currency for WooCommerce300+ installs apply_filters( 'woocommerce_order_shipping_to_display_shipped_via', ' <small class="shipped_via">' . $via_method . '</small>', $order ) includes/class-alg-wc-pgbc-convert-info-frontend.php:219
  5. Cryptocurrency Product for WooCommerce icon Cryptocurrency Product for WooCommerce10+ installs apply_filters( 'woocommerce_order_shipping_to_display_shipped_via', ' <small class="shipped_via">' . sprintf( __( 'via %s', 'woocommerce' ), $order->get_shipping_method() ) . '</small>', $order ) cryptocurrency-product-for-woocommerce.php:1617

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.