亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

當客戶在 WooCommerce 中批準訂單時向他們添加訂單備注

當客戶在 WooCommerce 中批準訂單時向他們添加訂單備注

PHP
慕斯王 2023-08-26 17:35:06
在 WooCommerce 中,允許客戶在 WooCommerce 中更改訂單狀態回答我之前的問題,允許客戶在“我的帳戶”頁面中批準(完成)訂單,但我不知道如何自動添加注釋,因此當客戶批準訂單(訂單狀態更改為已完成),我想自動為客戶添加注釋。當客戶批準訂單并且狀態更改為“已完成”時,是否可以添加注釋?
查看完整描述

1 回答

?
慕的地6264312

TA貢獻1817條經驗 獲得超6個贊

如果您想要客戶的訂單備注,請替換以下代碼行:


? ? ? ? // Change order status to "completed"

? ? ? ? $order->update_status( 'completed', __('Approved by the customer', 'woocommerce') ) ;

經過:


? ? ? ? // Add an order note for the customer (blue background note in admin orders)

? ? ? ? $order->add_order_note( __('You have approved this order on', 'woocommerce') . ' ' . date_i18n( 'F j, Y' ), true );


? ? ? ? // Change order status to "completed"

? ? ? ? $order->update_status( 'completed', __('Approved by the customer', 'woocommerce') ) ;

查看完整回答
反對 回復 2023-08-26
  • 1 回答
  • 0 關注
  • 118 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號