我正在研究與WooCommerce商店進行交互的插件,問題是插件和商店位於同一WordPress安裝(相同的服務器和域)以及WooCommerce Rest API didn沒有工作。我已經問過這個問題: WooCommerce API Issue with Authentication Consumer Key is missing 我的問題:有沒有辦法與WooCommerce直接交互,而不RE
我想掛鉤一個函數刪除命令(當從管理頁面單擊永久刪除時),但由於某種原因,該函數不被調用。我的代碼看起來像 add_action('woocommerce_before_delete_order_item', function($id) {
$order = new WC_Order($id);
//do some stuff with order meta data
}, 1