Title: MyStorefront Postback for WooCommerce
Author: roxifrancke
Published: <strong>2026 年 7 月 23 日</strong>
Last modified: 2026 年 7 月 23 日

---

搜尋外掛

![](https://ps.w.org/mystorefront-postback/assets/icon.svg?rev=3620873)

# MyStorefront Postback for WooCommerce

 由 [roxifrancke](https://profiles.wordpress.org/roxifrancke/) 開發

[下載](https://downloads.wordpress.org/plugin/mystorefront-postback.1.0.0.zip)

 * [詳細資料](https://tw.wordpress.org/plugins/mystorefront-postback/#description)
 * [使用者評論](https://tw.wordpress.org/plugins/mystorefront-postback/#reviews)
 *  [安裝方式](https://tw.wordpress.org/plugins/mystorefront-postback/#installation)
 * [開發資訊](https://tw.wordpress.org/plugins/mystorefront-postback/#developers)

 [技術支援](https://wordpress.org/support/plugin/mystorefront-postback/)

## 外掛說明

MyStorefront Postback connects a WooCommerce store to the [MyStorefront](https://mystorefront.io)
affiliate tracking platform. It attributes sales to the affiliate or creator who
referred the shopper and keeps discount codes in sync between the two systems.

**What it does**

 * **Real-time conversion postback** — when an order reaches a paid status, the 
   plugin sends the order details to your MyStorefront webhook, signed with an `
   Authorization: Bearer` secret, so the referring affiliate is credited.
 * **Refund clawbacks** — when an order is refunded, a negative-total postback is
   sent so the commission is reversed.
 * **click_id capture** — reads `?click_id=` from the landing URL, stores it in 
   a cookie + localStorage, and attaches it to the resulting order. Works with both
   classic and Block (Store API) checkout.
 * **Automatic retries** — failed postbacks are retried with exponential backoff
   via WP-Cron (up to 5 attempts).
 * **Delivery log** — the most recent postback attempts are viewable on the settings
   page.
 * **Discount code sync** — MyStorefront can create, update, and delete WooCommerce
   coupons through a secure REST endpoint, and the store notifies MyStorefront when
   a coupon changes, so both stay in sync.

The plugin runs entirely inside your WordPress site. All configuration is stored
in the WordPress options table — no `.env` file or third-party hosting of your settings
is required.

### External services

This plugin connects your store to **MyStorefront** (https://mystorefront.io), the
affiliate tracking platform operated by HashTopic (Pty) Ltd. The connection is required
for the plugin’s core purpose — attributing referred sales and syncing discount 
codes — and is configured by you on the plugin’s settings page (you enter your MyStorefront
webhook URL and secret, and generate an API key). No data is sent until you configure
the connection; nothing is transmitted on a site where the webhook URL is left empty.

The plugin contacts MyStorefront in the following cases:

 1. **When an order reaches a paid status, and when an order is refunded.** It sends
    an HTTP POST to the webhook URL you configure containing: the affiliate `click_id`,
    the order ID, number, status and total, the currency, per-line-item details (product/
    variant ID, SKU, title, quantity, price), shipping/tax/discount totals, the customer’s
    billing email and phone number, and your store URL. This is the data used to credit(
    or, on refund, reverse) the referring affiliate’s commission.
 2. **Discount code sync.** MyStorefront calls this site’s REST endpoints to create,
    update, or delete WooCommerce coupons, and the plugin notifies MyStorefront when
    a coupon is changed on the store. Coupon data exchanged includes the code, type,
    amount, minimum spend, expiry date, and usage limit. These requests are authenticated
    with the API key you generate on the settings page.

By using this plugin you are sending the data described above to MyStorefront. Please
review their terms and privacy policy:

 * Terms of Service: https://mystorefront.io/terms
 * Privacy Policy: https://mystorefront.io/privacy

## 安裝方式

 1. Upload the plugin ZIP via **Plugins  Add New  Upload Plugin**, then activate it.
    WooCommerce must be installed and active.
 2. Go to **WooCommerce  MyStorefront Postback**.
 3. Enter your **Webhook URL** and **Webhook Secret** (from MyStorefront), choose which
    order statuses count as paid, and save.
 4. Click **Send Test Postback** to confirm the connection.
 5. For discount sync, click **Generate New Key**, then paste the API Key and Webhook
    URL shown into MyStorefront  Settings  Discount Code Sync  WooCommerce tab and 
    verify the connection.

## 常見問題集

### Does this plugin require an account on another service?

Yes. It is a companion to the MyStorefront affiliate platform (https://mystorefront.
io). You need a MyStorefront account to obtain the webhook URL and secret it sends
data to. See the “External services” section for exactly what data is transmitted.

### Is any data sent before I configure it?

No. Until you enter a Webhook URL on the settings page, the plugin sends nothing
externally.

### Does it work with the Block (Store API) checkout?

Yes. The click_id capture supports both the classic checkout and the newer Block/
Store API checkout.

### What happens on a refund?

A postback with a negative total is sent so the affiliate’s commission can be clawed
back automatically.

### How do I deactivate a discount code?

Manage a code’s active/inactive state from MyStorefront. Deactivating it there immediately
expires the matching WooCommerce coupon so it stops working at checkout, and reactivating
it makes the coupon usable again. From the WooCommerce side, deleting (trashing)
a coupon also removes it from MyStorefront.

## 使用者評論

這個外掛目前沒有任何使用者評論。

## 參與者及開發者

以下人員參與了開源軟體〈MyStorefront Postback for WooCommerce〉的開發相關工作。

參與者

 *   [ roxifrancke ](https://profiles.wordpress.org/roxifrancke/)

[將〈MyStorefront Postback for WooCommerce〉外掛本地化為台灣繁體中文版](https://translate.wordpress.org/projects/wp-plugins/mystorefront-postback)

### 對開發相關資訊感興趣？

任何人均可[瀏覽程式碼](https://plugins.trac.wordpress.org/browser/mystorefront-postback/)、
查看 [SVN 存放庫](https://plugins.svn.wordpress.org/mystorefront-postback/)，或透過
[RSS](https://plugins.trac.wordpress.org/log/mystorefront-postback/?limit=100&mode=stop_on_copy&format=rss)
訂閱[開發記錄](https://plugins.trac.wordpress.org/log/mystorefront-postback/)。

## 變更記錄

#### 1.0.0

 * Initial release: conversion postback, refund clawback, click_id capture (classic
   + Block checkout), WP-Cron retries, delivery log, and two-way discount code sync.

## 中繼資料

 *  版本 **1.0.0**
 *  最後更新 **3 週前**
 *  啟用安裝數 **少於 10 次**
 *  WordPress 版本需求 ** 6.0 或更新版本 **
 *  已測試相容的 WordPress 版本 **7.0.3**
 *  PHP 版本需求 ** 8.0 或更新版本 **
 *  語言
 * [English (US)](https://wordpress.org/plugins/mystorefront-postback/)
 * 標籤:
 * [affiliate](https://tw.wordpress.org/plugins/tags/affiliate/)[conversion tracking](https://tw.wordpress.org/plugins/tags/conversion-tracking/)
   [discount codes](https://tw.wordpress.org/plugins/tags/discount-codes/)[postback](https://tw.wordpress.org/plugins/tags/postback/)
   [referral tracking](https://tw.wordpress.org/plugins/tags/referral-tracking/)
 *  [進階檢視](https://tw.wordpress.org/plugins/mystorefront-postback/advanced/)

## 評分

這個項目尚無任何評論記錄。

[Your review](https://wordpress.org/support/plugin/mystorefront-postback/reviews/#new-post)

[查看全部使用者評論](https://wordpress.org/support/plugin/mystorefront-postback/reviews/)

## 參與者

 *   [ roxifrancke ](https://profiles.wordpress.org/roxifrancke/)

## 技術支援

使用者可在技術支援論壇提出意見反應或使用問題。

 [檢視技術支援論壇](https://wordpress.org/support/plugin/mystorefront-postback/)