When I reject end exiting registered user for an vendor application, I do not want to delete the user - how can I do this? The only option I have is to delete the user.
I have just made an update to the plugin to add support for this. Please follow these steps to set it up:
1. Update MarketKing Core to the attached version. You will need to first deactivate the existing version of MarketKing Core, then upload and activate the attached one.
1) I would have liked the user receive an email informing that his application is rejected. 2) The user be able to apply again. The way it works now, one has to delete the account, then the recreate the user and try again.
1) To send an email when an application is rejected, you can add the following code snippet to your site:
add_action('marketking_reject_user_admin_before_delete', function($user_id){
$user = new WP_User($user_id);
$user_email = $user->user_email;
$message = 'Thank you for taking the time to register, however, we were unable to approve your application...';
do_action( 'marketking_new_message', $user_email, $message, get_current_user_id(), 0 );
}, 10, 1);
This can be added to the functions.php file of your theme or via any code snippets plugin. Please note this uses the MarketKing 'New Message' email, so you must have the Messaging module enabled for it to work.
2) Regarding re-application, I don't have a perfect built-in solution for that specific flow yet.
However, something worth trying that might work is to set up a separate registration page with the "Existing users can apply" option enabled:
Hi there,
When I reject end exiting registered user for an vendor application, I do not want to delete the user - how can I do this? The only option I have is to delete the user.
Help is much appreciated.
Hi Charl,
Thanks for reaching out,
I have just made an update to the plugin to add support for this. Please follow these steps to set it up:
1. Update MarketKing Core to the attached version. You will need to first deactivate the existing version of MarketKing Core, then upload and activate the attached one.
2. Then, add this PHP code snippet to your site:
This can be added to the functions.php file of your theme or via any code snippets plugin.
Let me know if you need anything else or any other custom behavior to happen,
Kind regards,
Stefan
Thanks for the quick response, Stefan - will test it out early tomorrow morning...
Hi Stefan, it 100% worked, thanks a mil.
I think this is good for a quick fix,
1) I would have liked the user receive an email informing that his application is rejected.
2) The user be able to apply again. The way it works now, one has to delete the account, then the recreate the user and try again.
Again, much appreciated for your help.
Hi Charl,
Great to hear that worked for you,
Regarding your other points:
1) To send an email when an application is rejected, you can add the following code snippet to your site:
This can be added to the functions.php file of your theme or via any code snippets plugin. Please note this uses the MarketKing 'New Message' email, so you must have the Messaging module enabled for it to work.
2) Regarding re-application, I don't have a perfect built-in solution for that specific flow yet.
However, something worth trying that might work is to set up a separate registration page with the "Existing users can apply" option enabled:
https://prnt.sc/hzpzu41BMg1x
This way you would have a permanent 'Become a Vendor' page that they can reuse to apply again.
Kind regards,
Stefan