Hide a Shipment Tracking provider

Use the wc_shipment_tracking_get_providers filter to remove carriers your fulfillment team does not use. A smaller provider list can make the order workflow faster and prevent staff from choosing a similarly named carrier by mistake.

Note:

Removing a provider from the list does not delete tracking items already saved with that provider. Review existing orders and integrations before hiding a carrier that is still in use.

Example

↑ Back to top

This example removes USPS from the United States provider group and returns the modified provider array.

<?php
add_filter(
    'wc_shipment_tracking_get_providers',
    function ( $providers ) {
        unset( $providers['United States']['USPS'] );

        return $providers;
    }
);

Array keys must match

↑ Back to top
KeyExampleRequirement
Provider groupUnited StatesUse the exact regional group from the provider list.
Provider nameUSPSUse the exact provider key inside that group.
Return value$providersAlways return the filtered array.

Calling unset() for a key that is not present is safe, which lets the snippet continue working if the built-in list changes. If another callback adds USPS after this callback runs, attach your callback at a later priority so it removes the final value.

What the filter changes

↑ Back to top

The provider disappears from the order editor and the REST API endpoint that lists providers. The filter does not modify the database, rewrite existing provider URLs, or remove tracking data from customer emails. Saved tracking items continue to use the provider information stored on the order.

Verify the change

↑ Back to top
  • Open the Shipment Tracking panel on an order and confirm the provider no longer appears.
  • Request /wp-json/wc-shipment-tracking/v3/shipment-trackings/providers and confirm the provider is absent.
  • Review recent orders that used the provider and confirm their existing tracking links still work.
  • Check custom code that expects the provider key before deploying the filter to production.

To restore the provider, remove the filter callback. Because this customization changes the provider array at runtime, no data migration is required.

Related Products

Offer add-ons like gift wrapping, special messages or other special options for your products.

Let customers subscribe to your products or services and pay on a weekly, monthly or annual basis.

Use of your personal data
We and our partners process your personal data (such as browsing data, IP Addresses, cookie information, and other unique identifiers) based on your consent and/or our legitimate interest to optimize our website, marketing activities, and your user experience.