Skip to content

Instantly share code, notes, and snippets.

@harishankerr
Last active September 2, 2016 13:29
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/c4c6282ba5cbc0c61a6ba303c8cd66d5 to your computer and use it in GitHub Desktop.
Save harishankerr/c4c6282ba5cbc0c61a6ba303c8cd66d5 to your computer and use it in GitHub Desktop.
<?php // Remove this if not required.
add_filter( 'wc_shipment_tracking_get_providers', 'custom_woocommerce_shipment_tracking_provider' );
function custom_woocommerce_shipment_tracking_provider( $provider ) {
$provider = array(
'United States' => array(
'UPS'
=> 'http://wwwapps.ups.com/WebTracking/track?track=yes&trackNums=%1$s',
'USPS'
=> 'https://tools.usps.com/go/TrackConfirmAction_input?qtc_tLabels1=%1$s',
),
);
return $provider;
}
@chastagi
Copy link

chastagi commented Sep 2, 2016

Thanks for this. Definitely add this to the plugin docs to help others if you haven't already :)
👍

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