Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Customize Shipping Providers
add_filter( 'wc_shipment_tracking_get_providers', 'custom_shipment_tracking' );
function custom_shipment_tracking( $providers ) {
unset($providers['Australia']);
unset($providers['Austria']);
unset($providers['Brazil']);
unset($providers['Belgium']);
unset($providers['Canada']);
unset($providers['Czech Republic']);
unset($providers['Finland']);
unset($providers['France']);
unset($providers['Germany']);
unset($providers['Ireland']);
unset($providers['Italy']);
unset($providers['India']);
unset($providers['Netherlands']);
unset($providers['Romania']);
unset($providers['South African']);
unset($providers['Sweden']);
unset($providers['New Zealand']);
unset($providers['United Kingdom']);
unset($providers['United States']['Fedex']);
unset($providers['United States']['Fedex Sameday']);
unset($providers['United States']['UPS']);
unset($providers['United States']['USPS']);
unset($providers['United States']['OnTrac']);
unset($providers['United States']['DHL US']);
return $providers;
}
@jwlichtle

This comment has been minimized.

Copy link

jwlichtle commented Feb 25, 2019

The second 'e' in Fedex should be capitalized on line 24.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.