[WordPress] 外掛分享: Transmit to Slack

首頁外掛目錄 › Transmit to Slack
WordPress 外掛 Transmit to Slack 的封面圖片
全新外掛
安裝啟用
尚無評分
2461 天前
最後更新
問題解決
WordPress 4.5.0+ PHP 5.2.4+ v1.0.0 上架:2019-06-22

內容簡介

這款 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

外掛標籤

開發者團隊

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

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「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

延伸相關外掛

文章
Filter
Mastodon