• Hi,

    So I created a php redirect whereby if someone registers he or she gets an automated login….However no user registration email with password is send anymore (also not in the official my-account woocommerce.

    How do add it to my php rediret? Here is the code:

    function auto_login_new_user( $user_id ) {
    wp_set_current_user($user_id);
    wp_set_auth_cookie($user_id);
    $referrer = $_SERVER[‘HTTP_REFERER’]; // where did the post submission come from?
    wp_redirect(preg_replace(‘/\?.*/’, ”, $referrer));
    exit();
    }
    add_action( ‘user_register’, ‘auto_login_new_user’ );

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • hannah

    (@hannahritner)

    Hey @montagne39,
    Thanks for reaching out and apologies for the delay! Have you tried adding that into your functions.php in your child theme? Have you tried reaching out to WooCommerce regarding this?

    Best,
    Hannah

    Thread Starter montagne39

    (@montagne39)

    Hi Hanna

    Yeah Woocommerce support doesnt support at all. And received a meal from you too..also no support..2bad

    hannah

    (@hannahritner)

    Hi,
    Sorry to hear you have not received great support. That’s frustrating. This plugin doesn’t control which emails send so I’m not sure how much help I can be. You didn’t answer my question from above. Have you tried adding that code into your functions.php in your child theme?

    Regards,
    Hannah

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Registration Email Not Sen’ is closed to new replies.