Merchants & developers

Install Apex on WooCommerce

Connect the Apex WooCommerce plugin with an install token, upload the plugin zip, and understand what WooCommerce data Apex receives.

The Apex WooCommerce plugin connects a WordPress/WooCommerce store to Apex with a short-lived install token. In Apex, the WooCommerce install action creates a token that starts with apx_woo_ and expires after 48 hours. In WordPress, you upload the plugin zip, paste the token in WooCommerce settings, and save.

After the token is claimed, the plugin stores the returned Apex shop ID, snippet URL, webhook URL, and webhook secret. It then injects the Apex storefront snippet and schedules signed order deliveries from WooCommerce.

Before you start

  • Use WordPress 6 or newer, WooCommerce 7 or newer, and PHP 7.4 or newer.
  • Have WordPress administrator access to install and connect the plugin.
  • Generate the token from Apex for the same shop you are connecting.
  • Download the latest apex-woocommerce.zip plugin package.

Generate the install token

  1. In Apex, open Settings, then Installation, then WooCommerce.
  2. Generate a WooCommerce install token.
  3. Copy the token. It is only useful for this connection flow and expires after 48 hours.

If the token expires, generate a new one in Apex and paste the new value into WordPress.

Upload the plugin zip

  1. In WordPress Admin, open Plugins, then Add New.
  2. Choose Upload Plugin.
  3. Upload apex-woocommerce.zip.
  4. Install and activate the plugin.

The plugin adds an Apex settings page under WooCommerce settings.

Connect in WooCommerce settings

  1. In WordPress Admin, open WooCommerce, then Settings, then Apex.
  2. Paste the apx_woo_... install token into Install token.
  3. Save changes.
  4. Confirm the page shows Connected with an Apex shop ID.

When the save succeeds, the plugin claims the token with Apex, stores the returned connection details, and enables Apex-signed delivery on order creation and updates. Version 0.2.3 retires the older Apex-owned native WooCommerce webhooks.

Confirm storefront tracking

The connected plugin injects the Apex snippet early in wp_head and loads a small WooCommerce bridge script. Visit the storefront in a normal browser session and then check Apex Installation or analytics to confirm events are arriving.

From version 0.2.3, the bridge sends page context, add-to-cart, checkout and purchase events through Apex's private data layer. Enable Also publish Apex-prefixed events to the GTM data layer in WooCommerce → Settings → Apex if you need Apex events in GTM. The optional event names are apex_virt_page_view, apex_add_to_cart, apex_begin_checkout and apex_purchase.

In WooCommerce → Settings → Apex, choose the storefront consent integration that matches your store. The plugin checks consent in the browser so cached pages can be shared across visitors.

  • Use Apex dashboard settings preserves the shop's existing Apex consent setup.
  • CookieFirst waits for performance consent, including a saved choice.
  • Google Consent Mode waits for an explicit gtag('consent', 'update', { analytics_storage: 'granted' }) on the standard data layer. For a GTM template that uses its internal consent API, use the custom integration to pass the analytics decision to Apex.
  • Custom reads window.__apexWooConsent === true on load and listens for apex_woo_consent on window with a boolean detail for later changes.

The snippet loads synchronously by default. You can enable asynchronous loading, limit it to URL paths such as /shop/*, or exclude checkout. The checkout exclusion keeps order confirmation eligible if it matches the configured paths. Order webhooks still run on all paths. For the anti-flicker timeout, open Settings → Developers → Runtime controls in Apex and enter the desired duration, such as 500 ms. With a browser consent integration, the snippet begins loading after consent instead of hiding the page while the banner is open.

Purge any cached storefront pages after upgrading or changing these settings. Keep WooCommerce checkout, order confirmation and cart AJAX responses outside any custom HTML caching rules.

What Apex receives

The WooCommerce plugin can send:

  • Storefront tracking events through the Apex snippet.
  • Page, product, cart, and order context from the WooCommerce bridge.
  • Signed order deliveries with allowlisted commerce, attribution and cost fields. Billing and shipping contact details, payment details and third-party order metadata stay in WooCommerce.
  • Signed refund events with amounts and line details. Free-text refund reasons stay in WooCommerce.
  • A recent-order sync from the settings page, limited to recent orders and an allowlist of Apex attribution and cost metadata.

Webhook requests are signed with the plugin webhook secret. Apex rejects inactive installations, unknown store URLs, invalid signatures, missing topics, and missing delivery IDs.

Troubleshooting

  • If WordPress shows a registration error, generate a fresh token in Apex and confirm the token was copied completely.
  • If the settings page does not show Connected, confirm WooCommerce is active and the WordPress server can reach Apex over HTTPS.
  • If storefront events do not arrive, confirm the plugin is active and the connected settings page shows a snippet URL.
  • If order events are missing, open WooCommerce settings, Apex, and check the last delivery status.
  • If historical orders are missing, use Sync recent orders from the Apex settings page after the connection is healthy.