Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WCFM – Feature Request › Allow adjusting the welcome email for new vendors via a filter
- April 28, 2020 at 2:52 pm #124142jannis.von.albedyllParticipant
In the file
\wc-frontend-manager\controllers\vendors\wcfm-controller-vendors-new.phpthe mail to welcome the new vendors is sent without applying a filter (lines 223-250 on version 6.4.8).
Instead of doing so you could use the wordpress-filter
wp_new_user_notification_emailfor the new users email (or use your own filter, if that is more comfortable for you). This would allow for adding a custom filter and thus change text-details, add custom-links, etc.
Here is a code example of how it could look like:
$message = apply_filters( ‘wcfm_email_content_wrapper’, $message, __( ‘New Account’, ‘wc-frontend-manager’ ) );
$email_data = array();
$email_data[‘to’] = $mail_to;
$email_data[‘subject’] = $subject;
$email_data[‘message’] = $message;
$email_data = apply_filters( ‘wp_new_user_notification_email’, $email_data, get_userdata($vendor_id), wp_specialchars_decode( get_option( ‘blogname’ ), ENT_QUOTES ) );
wp_mail( $email_data[‘to’], $email_data[‘subject’], $email_data[‘message’], $email_data[‘headers’] );
- You must be logged in to reply to this topic.