Full Answer
The clean pattern hangs the call off a WooCommerce hook. For a purchase you hook woocommerce_payment_complete or the order-status transition, then assemble the payload: an event name TikTok recognises such as CompletePayment, a server-generated event_id, the event timestamp, a properties block with value and currency, and a user block with SHA-256 hashed email and phone plus the IP and user agent.
You then transmit it with WordPress's HTTP API, wp_remote_post(), pointing at TikTok's event track endpoint and passing your access token in the request headers with the JSON body. Keep the access token in server configuration, not in the rendered page, and SHA-256 hash every piece of personal data before it leaves your server. Reading the response matters: a 200 with parse warnings still means dropped fields, so log the body during rollout rather than assuming success.
Two practical notes save grief later. Generate the event_id once and also feed it to the browser Pixel so TikTok deduplicates the matched pair instead of double counting. And fire the call asynchronously or guard it with a short timeout so a slow API response never delays checkout for the customer. With those in place, a few dozen lines of PHP on the right hook give you resilient server-side TikTok tracking without any third-party SDK.