What function can I use to determine new user registration?


I have created a function that sends a message to members. I would like this function to fire only if the user has just registered.

function send_message_to_new_member() {

   // If user has just created account
   if( is_new_user() ) { //is_new_user() doesn't exist, so how can I go about this?
      // Do something

add_action( 'woocommerce_order_status_completed', 'send_message_to_new_member', 2 );

Registration will take place at the Woocommerce checkout… not sure is the method of registration is different there compared to standard WordPress registration?

Dazza 5 months 2021-07-02T22:34:17-05:00 0 Answers 0 views 0

Leave an answer