我想修改函數在Woocommerce wc_create_new_customer,我已經加入這個我functions.php文件...Woocommerce - remove_action不工作
remove_action('init', 'wc_create_new_customer');
add_action('init', 'wc_create_new_customer');
function wc_create_new_customer($email, $username = '', $password = '') {
// My custom function
}
這顯然給了我一個錯誤wc_create_new_customer有已經被挖空了。我怎樣才能修改這個工作?
這沒什麼區別,原來的wc_create_new_customer函數仍然被調用而不是我的新版本。我懷疑init標籤可能不正確 – fightstarr20 2014-09-03 22:43:27
對不起,我錯過了你實際想要做的事情。看修改後的答案! – gregdev 2014-09-03 23:29:38
但是那麼原來的wc_create_new_customer代碼也不會運行? – fightstarr20 2014-09-04 09:16:27