Mirza Hamza
Forum Replies Created
-
Forum: Plugins
In reply to: [New User Approve] Email notificationsHello @spikeh1,
We are providing you with another solution that is tested and working fine on our side. Please add this code to the functions.php of the active theme and also remove the ‘new_user_approve_welcome_user_message‘ filter hook and its function from this code if you are already using it.
Note: The solution is for both WP registration and WooCommerce registration.
Please have a look at the screencast video:
The code is Here:
if(class_exists('pw_new_user_approve') || class_exists('PW_New_User_Approve')) {
$nua = pw_new_user_approve()->instance();
remove_action('register_post', array($nua, 'create_new_user'), 10, 3);
remove_action('woocommerce_created_customer', array($nua, 'nua_welcome_email_woo_new_user'));
add_action('register_post', 'nua_create_new_user', 10 ,3);
add_action('woocommerce_created_customer','nua_woo_welcome_email_new_user');
// ==============================================
// for wp default
function nua_create_new_user($user_login, $user_email, $errors) {
if ( $errors->get_error_code() ) {
return;
}
// create the user
$user_pass = wp_generate_password( 12, false );
$user_pass = apply_filters('nua_pass_create_new_user', $user_pass);
$user_id = wp_create_user( $user_login, $user_pass, $user_email );
if ( !$user_id ) {
$errors->add( 'registerfail', sprintf( __( '<strong>ERROR</strong>: Couldn’t register you... please contact the <a href="mailto:%s">webmaster</a> !' ), get_option( 'admin_email' ) ) );
} else {
// User Registeration welcome email
$disable = apply_filters('nua_disable_welcome_email',false, $user_id);
if(false===$disable) {
$message = nua_default_registeration_welcome_email();
$message = apply_filters( 'new_user_approve_welcome_user_message', $message, $user_email );
$subject = sprintf( __( 'Your registration is pending for approval - [%s]', 'new-user-approve' ), get_option( 'blogname' ) );
$subject = apply_filters( 'new_user_approve_welcome_user_subject', $subject );
wp_mail(
$user_email,
$subject,
$message,
nua_email_message_headers()
);
}
}
}
// ==============================================
// for woocommerce
function nua_woo_welcome_email_new_user($customer_id ) {
$customer = new WC_Customer( $customer_id );
$user_email = $customer->get_email();
$message = nua_default_registeration_welcome_email();
$message = apply_filters( 'new_user_approve_welcome_user_message', $message, $user_email );
$subject = sprintf( __( 'Your registration is pending for approval - [%s]', 'new-user-approve' ), get_option( 'blogname' ) );
$subject = apply_filters( 'new_user_approve_welcome_user_subject', $subject );
$disable_welcome_email = apply_filters('disable_welcome_email_woo_new_user', false );
if($disable_welcome_email===true) {
return;
}
wp_mail(
$user_email,
$subject,
$message,
nua_email_message_headers()
);
}
function nua_email_message_headers()
{
$admin_email = get_option( 'admin_email' );
if ( isset($_SERVER['SERVER_NAME']) && empty($admin_email) ) {
$admin_email = 'support@' . sanitize_text_field(wp_unslash($_SERVER['SERVER_NAME']));
}
$from_name = get_option( 'blogname' );
$headers = array( "From: \"{$from_name}\" <{$admin_email}>\n" );
$headers = apply_filters( 'new_user_approve_email_header', $headers );
return $headers;
}
// welcome user message filter
add_filter('new_user_approve_welcome_user_message', 'nua_welcome_user_message',10, 2);
function nua_welcome_user_message( $message, $user_email) {
return 'your registration is now awaiting approval'; // you can add your message here
}
}If you have any questions, feel free to reach out. We’re here to assist you.
Thank you
Hello @protport4991,
Thanks for contacting us,
I hope you are doing well, Could you please confirm your PHP version? This will help us reproduce the issue in our environment.
We’re happy to let you know that our beta version 1.5 is now available. This version includes new features and fixes for various bugs that may resolve your issue. You can download beta version 1.5 from the following link:
We recommend trying this version and share the feedback with us. If you are still experiencing the same problems, let us know. We are always available to help and want to ensure that you have the best experience with our plugin.
Thanks & Regards
WP Experts Support TeamHello @tamsin-carter,
Thanks for sharing the screenshot. It seems like there is a site-specific issue because we are unable to replicate the mentioned issue on our staging site.
We need additional details, please email us at this address ( [email protected] ) so we can help resolve your issue.
Hello @tamsin-carter,
We are unable to see the logo that you have provided. Can you please share it again so we can look into it?
Thank you
Hello @blue01015,
Please make sure that you are using the same plugin we shared with you in the last thread because we have tested this on our staging environment, and everything is working fine for both ( Block Cart & Block Checkout ) ( Legacy Cart & Legacy Checkout )
Kindly check the screencast video: https://www.awesomescreenshot.com/video/34827318?key=06dad44bc284a4cd316613a13186d417
It seems there might be a site-specific issue. We need some additional details, so please create a ticket on our official website, and we will connect you directly with our Technical Team.
We look forward to resolving your issue soon.
Thank you
Forum: Plugins
In reply to: [New User Approve] Notifications by mailHello @rebelojose,
If you have any questions, feel free to reach out. We’re here to assist you.
Hello @karbou,
Thank you for getting back to us. Are you using the beta version of the Email Templates plugin? If yes, kindly provide feedback on whether it is working fine. We are also waiting for feedback from other customers. If everyone’s feedback is positive, we will release the update next week.
Thank you
Forum: Plugins
In reply to: [New User Approve] Autoload nua_user_approved in wp_optionsWe would greatly appreciate your kind and honest review. Your feedback is important to us and can help other users make informed decisions about our product and services. Thank you for taking the time to share your thoughts.
Forum: Plugins
In reply to: [New User Approve] Autoload nua_user_approved in wp_optionsHello @thequreshi,
Thanks for contacting us,
I hope you are doing well, These options are in the legacy code category in the New User Approve and we have already implemented the improvements for this Zapier integration functionality we will improve it further to remove these options in the upcoming release of New User Approve, Now you can make the autoload OFF by adding the given code in the functions.php of the active theme.
Here is the code:
add_action('new_user_approve_activate', function () {
$nua_zap_pending = get_option('nua_user_pending', false);
$nua_zap_approved = get_option('nua_user_approved', false);
$nua_zap_denied = get_option('nua_user_denied', false);
if(false != $nua_zap_pending) {
delete_option('nua_user_pending');
update_option('nua_user_pending', $nua_zap_pending, 'no');
}
if(false != $nua_zap_approved) {
delete_option('nua_user_approved');
update_option('nua_user_approved', $nua_zap_approved, 'no');
}
if(false != $nua_zap_denied) {
delete_option('nua_user_denied');
update_option('nua_user_denied', $nua_zap_denied, 'no');
}
});Please Note: You need to Re-activate the plugin.
If you have any questions, feel free to reach out. We’re here to assist you.
Thanks & Regards
WP Experts Support TeamHello @lauralisa,
Thanks for contacting us,
I hope you are doing well, We have checked this and are unable to replicate the mentioned issue on our staging site.
It seems like this is a site-specific issue. Please create a ticket on our official website so that we can connect you directly with our Technical team.
Looking forward to getting your issue resolved.
Thanks & Regards
WP Experts Support TeamHello @sonjoe,
Thanks for contacting us,
I hope you are doing well, Could you please let us know are you using the beta version of our Email Templates plugin? If not then please use the beta version on your site and let us know if you still have any issues.
Here is the beta version: https://downloads.wp.xz.cn/plugin/email-templates.1.5-beta.1.zip
If you have any questions, feel free to reach out. We’re here to assist you.
Thanks & Regards
WP Experts Support TeamForum: Plugins
In reply to: [New User Approve] Email notificationsHello @spikeh1,
Actually, our team is looking into this so we will update you once we get a response from them.
Thank you
Forum: Plugins
In reply to: [New User Approve] Email notificationsHello @marcodedo,
Thanks for getting back to us, we will look into this and then update you.
Thank you
Forum: Plugins
In reply to: [New User Approve] Email notificationsHello @spikeh1 @marcodedo,
Can you please confirm is the default welcome email working fine without text customization?
Forum: Plugins
In reply to: [New User Approve] Email notifications