lundi 5 octobre 2015

wpmu_new_user hook not firing

I have a WP Multisite setup with woocommerce on each of the sites. I am trying to hook into wpmu_new_user to send customer info to our CRM when they register at the checkout.

add_action('wpmu_new_user', 'send_to_crm',10,1);
function send_to_crm($user_id) {
    //function sends data to CRM, have tested this works by placing code direct into functions.php with hard coded $user_id variable
}

With this added to my child theme's functions.php and going through the checkout process nothing is submitted to the CRM but the order goes through as normal.

So a couple of questions: 1. Is this the right hook to use? 2. If yes, is there something wrong with my code?

Thanks in advance!



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire