WooCommerce plugin
The SentBy plugin saves referrals, reports orders and checks itself. Most stores are tracking within an hour.
Requirements
- WordPress 6.4 or newer, WooCommerce 8.5 or newer, PHP 7.4 or newer.
- Classic or block checkout. High-performance order storage is supported.
- An administrator login with permission to manage WooCommerce.
Install
- In SentBy, open Setup, create a connection key and download the plugin zip. The connection key bundles your secret key and signing secret, so the plugin needs nothing else.
- In WordPress, go to Plugins, Add New, Upload Plugin, choose the zip and activate it.
- Copy your connection key from SentBy and paste it into WooCommerce, Settings, SentBy. A key starting
sbc_test_sends test orders; a key startingsbc_live_sends real ones. - Click Check connection. The plugin confirms your domain to SentBy, so you do not need to add a DNS record.
- Click Send test conversion. A test order using one of your real products appears on your SentBy checklist within seconds, and the checklist shows Tracking verified.
Your connection key is stored without autoloading and is never shown again in full. Keep it secret; if it leaks, rotate it in SentBy and paste the new one.
What the plugin does
| When | What happens |
|---|---|
| A shopper lands with a click id | Sets the referral cookie on your domain, and tells caches not to store that response. |
| The page came from a cache | The bundled page script saves the referral through the plugin's own route. |
| An order is placed | Stores the click id and click history on the order. |
| The order is paid | Queues a signed order.paid event, with items, coupon codes and a coded customer reference. EFT orders are sent when they move to processing, never while on hold. |
| A refund or cancellation | Sends order.refunded (with the refunded items) or order.cancelled. |
| Daily | Compares recent orders with SentBy and resends anything missing, and reports its health. |
Events go through Action Scheduler, so a slow network never delays checkout. Failed sends retry after 1 minute, 5 minutes, 30 minutes, 2 hours and 12 hours, then show an admin notice and email you and us.
The plugin adds nothing to your checkout, cart or order received pages, and changes nothing a shopper sees.
Caching and script delay
The page script is served from your own site and is added to the exclusion lists of WP Rocket, LiteSpeed Cache, Perfmatters, Autoptimize, SiteGround Optimizer and FlyingPress automatically, so delay-JavaScript settings do not hold it back. The SentBy settings page shows the cache plugin it detected and whether delay is active.
Consent
By default the referral cookie is set when a shopper lands. If your store uses a consent banner, choose Wait for consent. The plugin then keeps the referral for the visit only, and extends it when the WP Consent API reports marketing consent. Either way, add our privacy notice paragraph to your privacy notice before you go live.
Coupon codes
Codes are mapped to affiliates in SentBy. The plugin sends every code used on an order, and SentBy decides who gets the sale. If you map a code that has been used before, SentBy warns you first.
Tracking health
The plugin reports its version, mode, checkout type, cache plugin and when WP-Cron last ran. If a live store switches to a test key, or stops reporting for 48 hours, your affiliates see that tracking is paused, and we are alerted. If WP-Cron has not run for 6 hours, your checklist warns you.
Updates
Updates arrive through the normal WordPress updates screen, from SentBy. Each update is signed, and the plugin checks the signature before installing.
Troubleshooting
- Check connection fails: make sure your site is reachable over https and that a security plugin is not blocking
/wp-json/sentby/. - A sale is missing: run
wp sentby resend <order id>, or wait for the daily check to catch it. - Clock skew warning: your server clock is off. The plugin corrects for it, but ask your host to enable time sync.
To remove SentBy, deactivate the plugin. Deleting it removes its settings; your orders are not changed.