Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Shipment Tracking: adds custom provider
* wc_shipment_tracking_add_custom_provider
* Adds custom provider to shipment tracking or add existing providers to another country.
* Change the country name, the provider name, and the URL (it must include the %1$s)
* Add one provider per line
add_filter( 'wc_shipment_tracking_get_providers' , 'wc_shipment_tracking_add_custom_provider' );
function wc_shipment_tracking_add_custom_provider( $providers ) {
$providers['France']['French New Mail'] = '$s'; // add a custom provider
$providers['United Kingdom']['UPS'] = '$s&requester=WT'; // add UPS to the United Kingdom
return $providers;

This comment has been minimized.

Copy link

@yaniv691 yaniv691 commented Jan 16, 2019

How can I set the provider name in a language other than English, e.g. Hebrew or Arabic?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment