
內容簡介
這款 WordPress 外掛可即時將新訂單從 WooCommerce 傳送到您所選的 Slack 頻道。
畫面截圖
這是新訂單在 Slack 上的顯示方式(版本 1.0)
開始使用
步驟 1:建立 Slack App
前往 Slack APIs:https://api.slack.com/apps/ 並登入
建立一個新的應用程式
給它一個名稱(例如 WC Orders)
選擇您想要整合的工作區
在「為 Slack 建立應用程式」下面,點擊「傳入 Webhook」
在頂部啟用傳入 Webhooks
接著,在底部點擊新增 Webhook 的按鈕
選擇您希望顯示訂單的頻道
您可以在 Slack 上創建一個新頻道,然後重新整理該頁面,以便您可以選取剛剛創建的頻道
點擊安裝
您將看到一個新的 Webhook URL,例如 https://hooks.slack.com/services/T8KD1LQ……
複製這個 URL
步驟 2:新增程式碼
將以下程式碼新增至您的 functions.php。
將「paste Webhook URL here」更改為從步驟 1 中複製的 URL
add_filter(‘transmit_to_slack_webhook_url’, ‘slack_webhook_url’);
function slack_webhook_url(){
return ‘paste Webhook URL here’;
}
在 GitHub 上貢獻
歡迎您在 GitHub 上貢獻這個開放原始碼專案:
https://github.com/shirgans/transmit-to-slack
外掛標籤
開發者團隊
原文外掛簡介
Instantly sends new orders from WooCommerce to your desired Slack channel.
Screenshots
This is how new orders shows on Slack (Ver. 1.0)
Getting Started
Step 1: Create Slack App
Go to Slack APIs: https://api.slack.com/apps/ and login
Create a new app
Give it a name (WC Orders, for example)
Choose the workspace you would like to integrate with
Under “Building Apps for Slack” click on “Incoming Webhooks”
At the top – Activate Incoming Webhooks
Then, at the bottom, click on the button to add new webhook
Choose the channel you wish the orders will show in
You can create a new channel on slack and then refresh that page, so you can select the channel you just created
Click Install
You will see a new webhook URL, something that starts like this: https://hooks.slack.com/services/T8KD1LQ……
Copy this URL
Step 2: Add code
Add the following code to your functions.php.
change “paste Webhook URL here” to the copied URL (from step 1)
add_filter(‘transmit_to_slack_webhook_url’, ‘slack_webhook_url’);
function slack_webhook_url(){
return ‘paste Webhook URL here’;
}
Contribute on GitHub
You are welcome to contribute this open source project on GitHub:
https://github.com/shirgans/transmit-to-slack
