rem_new_agent_approved
This action is called whenever a new agent is approved and is located in classes/setup.class.php
Arguments
- Agent Details [Array]
- username
- first_name
- last_name
- useremail
- and all other custom agent fields
Example
Suppose you want to send a custom email to a specific email address whenever a new agent is approved, paste below code in your theme’s functions.php file and replace the email address (your@email.com).
add_action( 'rem_new_agent_approved', 'rem_custom_email_on_approved', 10, 1 ); function rem_custom_email_on_approved($agent){ wp_mail( 'your@email.com', 'Agent Approved', 'agent is approved with email address '. $agent['useremail']); }