Connect WooCommerce

Updated Oct 25, 2026 · 6 min read · Pro, Business and Agency plans

This article shows you how to send your WooCommerce orders and refunds to PlayerMagick, so each sale is matched to the play that sold it.

Available on: Pro, Business and Agency plans.

How it works

The PlayerMagick for WooCommerce plugin does two things:

  • It makes the match exact. PlayerMagick adds pm=… to the links of the player's buttons. The plugin keeps that code while the buyer moves through your store and saves it on the order.
  • It sends your orders to PlayerMagick. You paste one connection code, and the plugin creates the two WooCommerce webhooks that send new and changed orders. Each one is signed with your secret, so nobody else can send you fake orders.

What counts:

  • An order counts when it is paid (status Processing or Completed).
  • Refunds, partial or full, are subtracted (without tax and shipping).
  • Renewal orders from WooCommerce Subscriptions are shown as renewals, not as new sales of your video.
  • When the code is missing, orders are matched by the buyer's email (a viewer who gave the same address and watched in the 7 days before), or counted as not matched.

The plugin

  • Download PlayerMagick for WooCommerce (sign in to PlayerMagick first).
  • It sets one cookie, pm_token, for 24 hours, only when a page is opened with ?pm=…, and stores one thing on the order: the code, only when it has the exact form of a PlayerMagick code.
  • It prints nothing on your store's pages. Orders reach PlayerMagick only through the two WooCommerce webhooks. The plugin itself sends one request: a test sale with made-up data, when you click Connect or Send a test.
  • It works with the classic checkout and the block checkout, and with High-Performance Order Storage. It needs WordPress 6.5 or later, PHP 7.4 or later and WooCommerce 8.0 or later. It is free software (GPL).

Step 1: Install the plugin

  1. Download the plugin from the link above.
  2. In WordPress, open Plugins → Add New Plugin → Upload Plugin, choose the file, click Install Now, then Activate Plugin.

Tip: If you installed version 1 of the plugin before, WordPress installs version 2 next to it and asks you to delete the older copy. Deactivate and delete it under Plugins: version 2 does everything it did, and your orders keep their codes.

Step 2: Connect WooCommerce in PlayerMagick

  1. Go to Settings → Sales platforms and click Connect a platform.
  2. Next to WooCommerce, click Connect. Keep the suggested Webhook secret and click Connect.
  3. The setup page shows your connection code. Click Copy code: PlayerMagick shows it only once.

Step 3: Paste the code in WordPress

  1. In WordPress, open WooCommerce → PlayerMagick.
  2. Paste the connection code and click Connect.

The plugin sends a signed test sale first. When PlayerMagick accepts it, the plugin creates the two webhooks (Order created and Order updated) and says Connected. If PlayerMagick refuses it, nothing is changed and the page says why.

Step 4: Check it works

  • The test sale appears under Recent notifications on the connection's page in PlayerMagick. Test sales never count.
  • On WooCommerce → PlayerMagick, each webhook shows its last delivery, for example "Last order sent 5 mins ago: accepted by PlayerMagick (200)". WooCommerce sends orders in the background, usually within a minute.
  • Click Send a test at any time to check the connection again.
  • Point the player's buttons at your store's product, cart or checkout pages. PlayerMagick adds pm=… when the viewer clicks.
  • If a page caching plugin or CDN serves pages with ?pm=… from its cache without running WordPress, the plugin can't keep the code on that page. Link the button straight to your cart or checkout page (never cached), or remove pm from your cache's ignored query strings.

Add the webhooks yourself (alternative)

You can skip the plugin's settings page and create the webhooks by hand. You still need the plugin for exact matching.

  1. On the connection's setup page in PlayerMagick, copy the receiver address (shown once, right after you connect) and keep the webhook secret you saw when connecting.
  2. In WordPress, open WooCommerce → Settings → Advanced → Webhooks and click Add webhook.
  3. Name it PlayerMagick, set Status to Active and Topic to Order created, and paste the receiver address as the Delivery URL.
  4. In Secret, enter the webhook secret, keep API Version at WP REST API Integration v3, and click Save webhook. WooCommerce checks the address with a ping, shown in PlayerMagick as a test.
  5. Add a second webhook the same way with Topic set to Order updated. It carries payments that complete later (bank transfers, for example) and refunds.

If you paste the connection code in the plugin later, it takes over webhooks that already use the same address instead of adding new ones.

Change or remove the connection

  • New address or secret: on WooCommerce → PlayerMagick, paste a new connection code, or open Or enter the receiver address and the webhook secret separately and paste only what changed. A blank field keeps the saved value. The plugin updates the same two webhooks.
  • Lost the connection code: on the connection's page in PlayerMagick, click Regenerate address for a new address, and save a new webhook secret under Secrets if you need one. Paste them separately in the plugin.
  • Disconnect: click Disconnect on WooCommerce → PlayerMagick. The two webhooks are deleted. Remove the connection in PlayerMagick too.
  • Deactivating the plugin keeps the webhooks: orders are still sent and matched by email. Deleting the plugin also deletes its webhooks and settings.

Troubleshooting

  • "PlayerMagick refused the test sale: the webhook secret doesn't match." Copy the connection code again, or save a new webhook secret in PlayerMagick and paste it in the plugin.
  • "PlayerMagick doesn't know this receiver address." The address was regenerated or the connection was removed in PlayerMagick. Paste the newest address.
  • "The receiver address couldn't be reached from this site." Your host blocks requests to other websites. Ask your host to allow cdn.playermagick.com.
  • A webhook says "Disabled by WooCommerce". WooCommerce disables a webhook after several failed deliveries in a row and doesn't send missed orders again. Fix the cause, then click Turn the webhooks back on.
  • The page lists other webhooks that also send orders to PlayerMagick. They are from an earlier setup by hand, or point to an old address. Delete them under WooCommerce → Settings → Advanced → Webhooks so orders aren't sent twice.
  • Refused: the signature didn't match the saved secret (in PlayerMagick's Recent notifications). The secret in a webhook and in PlayerMagick differ. Paste the same value in both, or connect through the plugin so it sets both webhooks for you.
  • Ignored: status on-hold (or pending, failed, cancelled). The order isn't paid yet. It counts when it becomes Processing or Completed.
  • Ignored: failed after payment (a lost dispute?). Some payment plugins mark an order Failed when a dispute is lost. WooCommerce doesn't send disputes, so check the order and refund it in WooCommerce if needed.

Was this article helpful?