Developers

Advanced Shipment Tracking is built to be extended. This section covers the public functions and filters the free plugin exposes, so you can add tracking from your own code, read it back out, and adjust how tracking arrives through the REST API.

If you’re integrating an external system rather than writing PHP inside WordPress, start with the shipment tracking REST API instead.

In this section

Before you start

  • Put your code in a site-specific plugin or your child theme’s functions.php, not in the AST plugin itself — a plugin update would overwrite it.
  • Guard every call with function_exists() or class_exists(), so your site doesn’t fatal if AST is deactivated.
  • Carrier names must match a carrier enabled in the store. The carriers reference lists every name and slug.
  • All of this works the same with WooCommerce High-Performance Order Storage (HPOS) enabled.