Top WooCommerce & WordPress Plugins › Forums › Email Verification for WooCommerce › Is there a hook that I could put in place of bp_core_activated_user?
- Support forum for the Email Verification for WooCommerce.
- This topic has 6 replies, 2 voices, and was last updated 2 years, 6 months ago by
WPFactory Plugins.
- AuthorPosts
-
April 1, 2021 at 4:28 am #101284
Darryl
GuestHello! I am interested in buying this plugin, though I would like to know one thing.
I currently run a BuddyPress site. Upon user signup, they need to verify their email address, just like the function of this plugin. I’ve created my own small plugin that sends members a welcome message immediately upon activation using the hook:
add_action( ‘bp_core_activated_user’, ‘send_message_to_new_member’, 2 );If I were to use your plugin, is there a hook that I could put in place of bp_core_activated_user ?
Kind Regards,
– DazzaApril 1, 2021 at 4:59 am #101285Darryl
GuestPlease take a look here and suggest how I may be able to adapt and implement a hook: https://pastebin.com/5i7kG6Et ๐
April 1, 2021 at 2:21 pm #101286Hello Darryl,
I believe we have the hook you need:
add_action( 'alg_wc_ev_user_account_activated', 'send_message_to_new_member')
This hook uses just a
$user_id
parameter.Let me know if it helps ๐
April 2, 2021 at 12:14 am #101287Darryl
GuestThanks for your response! If you look at my pastebin you’ll see that I already tried that, but unfortunately it does not work ๐ My code works with the previous hook, but not the one you have provided. Do you have any clues to why this might be?
April 2, 2021 at 1:43 pm #101288Probably you need to remove the number 2 from the call.
From:add_action( 'alg_wc_ev_user_account_activated', 'send_message_to_new_member', 2 );
To:
add_action( 'alg_wc_ev_user_account_activated', 'send_message_to_new_member' );
Apart from that, can you please describe what’s not working?
Do you know if the function is being called or if there is some error?April 2, 2021 at 3:23 pm #101289Darryl
GuestI tried that, but no success. What should happen is that as soon as the user verifies their email address and becomes a verified member, they will be sent a message in BuddyPress. As I mentioned, the plugin works using a BuddyPress email verification hook — I figured that I could just swap the hook for the one you suggested and it would offer the same functionality, but seemingly not ๐ค Any tips would be appreciated!
April 2, 2021 at 3:54 pm #101290In that case, please to increase the priority. Instead of 2, try to use 10 for example.
And what would be the place you’re trying this code? It should be in functions.php.Also, please try to use a
error_log()
inside the function and check your debug.log to see if the function is being called or not. - AuthorPosts
- You must be logged in to reply to this topic.