[WordPress] 外掛分享: BuddyPilot Order Webhook Guard

首頁 › 外掛目錄 › BuddyPilot Order Webhook Guard
WordPress 外掛 BuddyPilot Order Webhook Guard 的封面圖片
全新外掛
安裝啟用
—
尚無評分
3 天前
最後更新
—
問題解決
WordPress 6.5+ PHP 7.4+ v1.0.0 上架:2026-10-25

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.0.0) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「BuddyPilot Order Webhook Guard」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

BuddyPilot Order Webhook Guard fixes one specific WooCommerce side effect. Since WooCommerce 11.0, verifying a customer’s email address (a completed password reset, a set-password link for a new account, or a clicked verification link) reassigns every matching guest order to that account. Each reassigned order is saved, and every save fires the order.updated webhook.
If an external integration listens to order.updated and acts on it, for example an invoicing service that issues an invoice per order update, a single password reset can produce a burst of unwanted webhooks and duplicate documents, one for each past guest order on that email address.
This plugin suppresses the order.updated webhook only while that linking routine runs. The orders are still reassigned to the account, so the customer keeps their order history and download permissions; only the webhook delivery for those particular saves is skipped. Every other order.updated event, such as a status change or a manual edit in the admin, is delivered as usual.
What it does

Suppresses the order.updated webhook only during guest-order linking, and nothing else
Keeps the account linking intact, so customers keep their past orders and download permissions
Covers both linking paths: automatic (after email verification) and manual (the admin “link orders” action on the Customers report)
Leaves every other webhook topic, and every other order.updated event, untouched
Uses only public WooCommerce extension points and does not modify WooCommerce core
Zero configuration: no settings page, no options, no database writes

How it works
WooCommerce links past guest orders through its wc_update_new_customer_past_orders() routine. The plugin wraps that routine with a short-lived, process-local flag and, while the flag is raised, returns false from the woocommerce_webhook_should_deliver filter for the order.updated topic. WooCommerce evaluates that decision synchronously as each order is saved, so no matching webhook is queued for delivery. The flag is always cleared afterwards, even if an order save throws.

延伸相關外掛

文章
Filter
Mastodon