Hey guys,
Sorry to bounce but is there any chance of an update on this. It’s fairly time critical as we’re pushing towards the site launch and this is a bit of a show stopper.
Any assistance would be very much appreciated.
Best wishes.
I asked Jason about it and this was his reply:
” I would suggest that they use one of s2Member’s API Notifications for this. They are the perfect tool for the job there. WP Admin -> s2Member -> API / Notifications
“Otherwise, if a particular plugin (i.e. WP Affiliate) is not working properly with s2Member’s hooks; or not with certain hooks fired by s2Member; that’s something they would want to contact WP Affiliate about.
“If there is a technical issue identified, please have them create an issue for us at GitHub.” https://github.com/WebSharks/s2Member/issues
Hi Christian,
Thanks very much for your response.
I’ve been reading over the forum and can see as you say that I could probably achieve this by using custom code and some of the API functionality you mention.
I’m happy to do this, or indeed raise an issue over on GitHub. However, before I do I just wanted to understand the reason why the ‘user_register’ hook isn’t being fired when a user registers from the ProForm. From reading the WP-Affiliate forum they have worked with you guys to integrate the two plugins and I have seen posts from Jason saying that the hook is fired from S2. I’ve also spotted it in your functions in the code, it just doesn’t seem to get fired when I need it!
If this is working as intended then I’ll implement with my own code, just wanted to make sure before I start down that route.
Many thanks in advance!
Hey Christian,
Just a bit of further info. I’ve been doing a bit more testing and have discovered that the ‘wp_login’ hook doesn’t appear to get fired either for non admin logins.
Again, I’ve attached a logging function to both the ‘wp_login’ and wp_logout’ hooks. With an admin user both hooks get fired as I would expect. However, with a non-admin user only the ‘wp-logout’ hook is fired.
Is this by design or a potential issue?
Again, I’ve identified a possible work around that I can use to implement the functionality I require. That said I’d just like to understand why these hooks aren’t being fired?
Best wishes,
Nigel.
I asked Jason and this is what he said:
“The user_register
hook in WordPress is always fired during a Pro Form submission when there is a new customer. The only time it would not be fired is when/if the user is already logged into the site when they begin checkout (i.e. NOT a new user). 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. So if that were not firing for some reason (e.g. theme/plugin conflict of some sort), there would be a bigger problem to deal with all together. s2Member itself would be broken as well.”