New url dashboard – panel
Code request:
$email = sanitize_email($_POST['email']);
$user = wp_get_current_user();
if (email_exists($email)) {
$data = (object)array(
'email ' => $email,
'message' => '',
'errorMessage' => 'The email address is already used'
);
echo json_encode($data);
die();
}
$hash = md5($email . time() . wp_rand());
$new_user_email = array(
'hash' => $hash,
'newemail' => $email,
);
update_user_meta($user->ID, '_new_email', $new_user_email);
$sitename = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES);
$email_text = __(
'Howdy ###USERNAME###,
You recently requested to have the email address on your account changed.
If this is correct, please click on the following link to change it:
###ADMIN_URL###
You can safely ignore and delete this email if you do not want to take this action.
This email has been sent to ###EMAIL###
Regards,
All at ###SITENAME###
###SITEURL###'
);
$content = apply_filters( 'new_user_email_content', $email_text, $new_user_email );
$content = str_replace( '###USERNAME###', $user->user_login, $content );
$content = str_replace( '###ADMIN_URL###', esc_url( self_admin_url( 'profile.php?newuseremail=' . $hash ) ), $content );
$content = str_replace( '###EMAIL###', $email, $content );
$content = str_replace( '###SITENAME###', $sitename, $content );
$content = str_replace( '###SITEURL###', home_url(), $content );
wp_mail( $email, sprintf( __( '[%s] Email Change Request' ), $sitename ), $content );
I trying change self_admin_url on new address panel, but link doesn’t work and get 404
]]>The link that is in the email looks like this:
https://website.com/shop/merchandise-and-more/miniatures/32mm-resin-miniature/?_yith_wcwtl_product_id=5997&_yith_wcwtl_users_list-action=register&is-double-optin=1&yith-wcwtl-user-email=useremail%40gmail.com&nonce=5919828a59
I have fixed the body of the email with html to look how I want, but on top of the body it shows the name of the form in bold.
How can I remove this?
I don’t see an option to hide it and it doesn’t show up in the body field, it only shows in the inbox after the email is sent.
Thanks in advance
]]>The only way I can see is to cancel their subscription, then re-instate it. This is obviously not very effieient. Is there a way in which I can click on an individual member’s ‘direct email link’ and re-send their confirmation email, which also acts as their membership card?
Or, at least, redesign that email to look like the original and then to save it for all?
Hope this is clear,
Thanks,
Kelvin
]]>For example, visitors interested in becoming affiliates are asked to join list1. They receive a confirmation email, and once confirmed, the first newsletter of list1 is sent.
If they are approved as affiliates, I use an automation to add them to list2. The system sends the first newsletter of list2 PLUS another confirmation email. The system obviously recognizes them as a subscribed user because the first newsletter of list2 is sent.
I’ve tried tinkering with the automation to prevent this second confirmation email. Such as NOT removing them from list1 for 24 hours after the addition to list2.
It doesn’t matter, a new confirmation email is sent for every list change as if they’re a brand new subscriber. If they purchase something, they’ll receive another confirmation email. As a temporary solution, I edited the confirmation email to say that they only have to confirm once, but I’d like to make things as simple as possible for my users. Plus, it’s slightly annoying to keep being sent emails to confirm after the 1st time.
Any suggestions? These additional confirmation emails don’t appear to be necessary if the system is going to send the email.
Thank you for reading
]]>I built a form with Gutenverse form, setup SMTP and created a form action that sends a confirmation email to the person filling the form. It works fine but the email contains the whole form entries and I would like to remove all or part of them. However I cannot find anywhere how to do so, I can only modify the “intro” text. How can I select which entries get sent with the confirmation email?
Thanks,
Antonella