
內容簡介
WooCommerce Cancel Abandoned Order 提供一個小選項,讓您可以處理「被遺棄」的訂單。
例如,如果您有支票或轉帳類型的訂單,您可以設置最大的支付天數或小時數。
WooCommerce Cancel Abandoned Order 會檢查是否有收到付款,並在時間到期時將訂單狀態更改為「取消」。
GitHub | 捐贈
需求
PHP 最小版本:7.0
WordPress 最小版本:4.0
WooCommerce 最小版本:2.2
Hooks
Action
woo_cao_cancel_order ($order_id):訂單取消後。
Filters
woo_cao_gateways:為控制添加付款類型。
woo_cao_before_cancel_order:在取消訂單之前,傳送訂單 ID 和 WC_Order,如果您不想取消此訂單,應該傳回 true。
woo_cao_message_cancel_order:在取消訂單時可修改注釋。如果使用 ‘woo_cao_before_cancel_order’ 過濾器,此選項很方便。
woo_cao_date_order ($old_date, $gateway, $mode):更改待處理訂單的計算日期。
woo_cao_default_hours:訂單處理的默認小時數。
woo_cao_default_days:訂單處理的默認天數。
woo_cao_statustocancel ($status):添加或更改插件應該取消的 WooCommerce 訂單狀態。
Wiki
此代碼的使用說明可在此查閱
外掛標籤
開發者團隊
原文外掛簡介
** Cancel Abandoned Order** allows you to add a small option that will take care of dealing with “abandoned” commands.
If you have check or transfer type orders for example, you will be able to set a maximum number of days or by hours to receive the payment.
Cancel Abandoned Order, will take care of checking this and change the status of the order to “Cancel” if you have not received payment on time.
GitHub | Donate
Requirement
PHP minimal: 7.0
WordPress minimal: 4.0
WooCommerce minimal : 2.2
Hooks
Action
woo_cao_cancel_order ($order_id) : After cancel order.
Filters
woo_cao_gateways : Adds a payment gateway for the control.
woo_cao_before_cancel_order : Before canceling the order, send the order_id and the WC_Order if you do not want to cancel this order. Expect an exact return of true.
woo_cao_message_cancel_order : Allows you to modify the note when canceling the order. Handy if you use the ‘woo_cao_before_cancel_order’ filter.
woo_cao_date_order ($old_date, $gateway, $mode) : Change the calculation date for pending orders.
woo_cao_default_hours : Default value of the number of hours for order processing.
woo_cao_default_days : Default value of the number of days for order processing.
woo_cao_statustocancel ($status) : Allows you to add or change which WooCommerce order status the plugin should cancel.
Wiki
A help section on the code is available here
