I’ve also had problems with this one. The devs tell me that the ‘user_register’ hook should always be fired. However, during my testing I couldn’t for the life of me get it to fire during a pro-form registration.
My solution (as I needed a custom redirect anyway) was to attach a filter to ‘ws_plugin__s2member_login_redirect’ that calls the WP-Affiliate functions accordingly. I won’t list my code here as it does a lot more and is probably overly complex. However for reference the functions you will need to call are:
handle_wp_user_login – For logging the user into the affiliate platform (assuming the id’s match)
wp_aff_handle_wp_user_registration – for registering the user as an affiliate.
Not saying this is the best way, but it works.
Hope it helps!
Thanks for the help. I might have to take this to a developer to get sorted for me.
For anyone else interested, this is the response I got from S2member:
“The user_register hook in WordPress is always fired during a Pro Form submission when there is a new customer. s2Member calls upon wp_create_user() which calls upon wp_insert_user(), which fires user_register. s2Member does in fact handle the registration of a customer via the user_register hook.”