Skip to content

Instantly share code, notes, and snippets.

@harishankerr
Last active August 12, 2016 11:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save harishankerr/c3dc781172b3ca625438695119116608 to your computer and use it in GitHub Desktop.
Save harishankerr/c3dc781172b3ca625438695119116608 to your computer and use it in GitHub Desktop.
TNT Express Tracking Workaround for WooCommerce Shipment Tracking Plugin
<?php // Use only if required
// Custom snippet to add TNT Shipping Functionality for the WooCommerce Shipment Traciking Plugin.
add_filter( 'wc_shipment_tracking_get_providers', '_wc_shipment_tracking_tnt_express_domestic' );
function _wc_shipment_tracking_tnt_express_domestic( $providers ) {
$providers['United Kingdom']['TNT Express domestic (consignment)'] = 'https://www.tnt.com/webtracker/tracking.do?cons=%1$s&trackType=CON&respLang=en&respCountry=gb&sourceCountry=gb&requestType=GEN&searchType=CON';
return $providers;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment