Documentation

Learn how to set up, customize, and expand the functionality of WooCommerce

Developer Docs


Documents

  • Add a custom Shipment Tracking provider

    Use the wc_shipment_tracking_get_providers filter to add a carrier that is not included in Shipment Tracking’s built-in list. Providers are grouped by region, and each provider maps to the URL used to build customer-facing tracking links. Example The snippet adds Example Courier to the United States group. Shipment Tracking replaces %1$s with the tracking number when […]

  • Add shipment tracking to an order programmatically

    Use wc_st_add_tracking_number() when a custom integration needs to attach shipment details after an order is fulfilled. The helper uses Shipment Tracking’s normal storage and formatting logic, so the result appears in the order editor, customer account, and supported order emails just like a tracking item entered by hand. Example The example checks that the helper […]

  • Create a custom-provider tracking item with the REST API

    Create a custom-provider tracking item when the carrier is not returned by the Shipment Tracking providers endpoint. Send the request to the same order collection used for predefined providers, but omit tracking_provider and provide the two custom-provider fields instead. Request body Send this JSON body with an authenticated POST request to /wp-json/wc-shipment-tracking/v3/orders/<order_id>/shipment-trackings. Custom-provider fields Field […]

  • Create a tracking item with the Shipment Tracking REST API

    Create a tracking item by sending a POST request to the order’s Shipment Tracking collection endpoint. Use the canonical wc-shipment-tracking/v3 namespace for new integrations. Request example Replace the credentials, site URL, and order ID with values from your store. This request adds a USPS tracking number to order 645. Request fields Field Required Description tracking_number […]

  • 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. Example This example removes USPS from the United States provider group and returns the modified provider array. Array keys must match […]

  • List Shipment Tracking providers with the REST API

    Use the providers endpoint to discover the carriers available on a store before creating a tracking item. The response groups provider names by region and maps each name to the URL format Shipment Tracking uses for customer links. Endpoint and response Send a GET request to /wp-json/wc-shipment-tracking/v3/shipment-trackings/providers. This shortened response shows the nested object structure. […]

  • Set the default Shipment Tracking provider

    Use the woocommerce_shipment_tracking_default_provider filter to preselect the carrier your store uses most often. This reduces repetitive data entry when staff add tracking details from the WooCommerce order editor. Example This example returns USPS whenever Shipment Tracking prepares the provider field. The returned value must match a provider label in the current provider list. Filter value […]

  • Understand Shipment Tracking REST API responses

    Shipment Tracking returns a normalized tracking item after a create, list, retrieve, or delete request. The response contains the customer-facing provider and tracking link rather than the internal order metadata used by the extension. Example response This example shows the primary fields returned for a predefined USPS tracking item. Response properties Property Type Description tracking_id […]

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.