Is it possible send CRED e-mail notification to all users after WP All Import to user custom field ?
I need to send a e-mail notification to all users when the user custom field changes after import.
Thank you
Hi, the only way to trigger email notifications with User custom field changes is to use a CRED Edit User form to make those field changes. There is not currently a good way to hook into events that update User fields using other methods, like an import script.
If the All Import plugin has an API, you could possibly use it to set the value of another custom field on a User Profile, which you could then use as a filter to create a View of profiles that need to be updated using a CRED form, with links to the edit form for each profile. Then you could manually update those profiles with CRED to trigger the email notifications. This is the only way I can think of to accomplish something like this in the current system.
Thank you for your response.
I'm thinking about it in a different way.
Is it possible to update users custom field for all user (or user role) through one cred form field?
You can perform a bulk edit like this with some custom code. Configure the CRED edit form to edit a specific User (it doesn't matter which User), and use the cred_save_data hook to perform all the other User updates with update_user_meta. CRED notifications will not be triggered for all the Users, only the 1 User being edited by the CRED form.
cred_save_data info: https://toolset.com/documentation/programmer-reference/cred-api/#cred_save_data
update_user_meta info: https://codex.wordpress.org/Function_Reference/update_user_meta