Skip to content

Instantly share code, notes, and snippets.

  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
/**
* 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