Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save conschneider/1832e366127a4c4620029e64ad7fc5f6 to your computer and use it in GitHub Desktop.
Save conschneider/1832e366127a4c4620029e64ad7fc5f6 to your computer and use it in GitHub Desktop.
/**
* wc_shipment_tracking_add_custom_provider
*
* Adds custom provider to shipment tracking
* 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_better_hermes' );
function wc_shipment_tracking_better_hermes( $providers ) {
$providers['Germany']['Hermes'] = 'https://new.myhermes.co.uk/track.html#/parcel/%1$s/details';
return $providers;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment