內容簡介
在 WordPress 中實現 Webhooks
這個外掛提供了一個簡單的閘道,將 webhook 調用轉換為常規的 XML-RPC 調用。
WordPress 擁有非常全面的 XML-RPC API。這個閘道將自動接受 webhook 調用並將其轉換為 XML-RPC 調用。
它聽取 Webhooks 以觸發 WordPress 中的 XML-RPC 方法。
它提供了一個簡單的短網址 /webhook 以觸發 WordPress 事件。
然後,您可以使用眾所周知和文檔完備的 WordPress 原生 XMLRPC API 來回應 Webhooks,並在插件和自定義函數中實現所需的功能。
傳入的 webhook POST 數據有效負載將原封不動地傳輸到 XML-RPC 方法。它應該是 XML 才能正常工作。
需要 PHP5。
Webhook 語法
如果您使用漂亮的永久鏈接:
http://[your-site]/webhook?method=misc.method
如果您沒有使用永久鏈接,則需要調用完整的長網址:
http://[your-site]/wp-content/plugins/yd-webhook-to-xml-rpc/webhook.php?method=misc.method
將 misc.method 替換為任何 XML-RPC 方法,包括 WordPress 內置的,您自己的,或來自第三方插件的方法。
用途
這個閘道已成功用於聽取 Shopify 的 Webhooks 以觸發 WordPress 事件(例如當購買完成時升級用戶狀態)。
積極支持
在我的YD Webhook to XML-RPC plugin 支持網站上給我留言,以報告錯誤,要求特定的功能或改進,或告訴我您如何使用它。
修訂記錄
0.1.0。2011/04/29 初始測試版釋出
您喜歡它嗎?
在 http://www.yann.com/en/wp-plugins/yd-webhook-to-xml-rpc 給我留言。
並且...請給這個插件評分 ->
外掛標籤
開發者團隊
原文外掛簡介
Implement incoming Webhooks in WordPress
This plugin implements a simple gateway to transform webhook calls into regular XML-RPC calls.
WordPress has a very comprehensive XML-RPC API. This gateway will automatically accept webhook calls and convert them into XML-RPC.
It listen to Webhooks to trigger XML-RPC methods in WordPress.
It provides a simple short /webhook URL for triggering WordPress events.
From then on you can use the well-known and well-documented native WordPress XMLRPC API to respond to webhooks and implement needed features in your plugins and custom functions.
The incoming webhook POST data payload will be transferred as-is to the XML-RPC method. It should be XML for it to work well.
Needs PHP5.
Webhook syntax
If you are using pretty permalinks:
http://[your-site]/webhook?method=misc.method
If you are not using permalinks, you need to call the long full url:
http://[your-site]/wp-content/plugins/yd-webhook-to-xml-rpc/webhook.php?method=misc.method
replace misc.method with any XML-RPC method, either WordPress built-in, or your own, or from a third-party plugin.
Uses
This gateway has successfully been used to listen to Shopify webhooks to trigger WordPress events (such as upgrade user status when a purchase has been completed).
Active support
Drop me a line on my YD Webhook to XML-RPC plugin support site to report bugs, ask for specific feature or improvement, or just tell me how you’re using it.
Revisions
0.1.0. Initial beta release of 2011/04/29
Did you like it?
Drop me a line on http://www.yann.com/en/wp-plugins/yd-webhook-to-xml-rpc
And… please rate this plugin –>
