Answer the question
In order to leave comments, you need to log in
Why is add_action not working in wordpress plugin?
I'm trying to write a plugin so that the new customer of the Wocomer will receive an email notification
with his details and a discount coupon
, I can't get it to send a letter, the
letter generally sends normally
to another hook, I hang up, the letters reach
, but I don't understand how to make a new user receive a letter during registration why is
the plugin code not working
function new_customer_registered_send_email_admin($user_login) {
$to = '[email protected]'; //EMAIL получателя
$subject = 'тема письма'; //Тема письма
$message = 'прошло'.$user_login;
wp_mail($to, $subject, $message);
}
add_action('new_customer_registered', 'new_customer_registered_send_email_admin');
<?php do_action( 'new_customer_registered', $user_login ); ?>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question