簡體   English   中英

WooCommerce:管理員手動創建訂單時需要掛鈎

[英]WooCommerce: need hook when admin manually creates order

我的網站之一使用WooCommerce。 客戶希望偶爾從訂單管理員(WooCommerce>訂單>添加訂單)中手動創建訂單。 當他們在該頁面上單擊“保存訂單”時,我需要對該訂單進行一些其他處理。

有鈎子可用嗎? 我瀏覽了WooCommerce文檔和掛鈎列表,但一無所獲。

看來woocommerce_process_shop_order_meta對我有用,

add_action( 'woocommerce_process_shop_order_meta', 'woocommerce_process_shop_order', 10, 2 );
function woocommerce_process_shop_order ( $post_id, $post ) {
        // my code here
}

我最近發現,從實際意義上講,WooCommerce文檔基本上是不存在的。 但是,您是否嘗試過woocommerce_admin_order_actions_endwoocommerce_admin_order_actions_start掛鈎?

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM