Allow adjusting the welcome email for new vendors via a filter

We're shifting our Forum based support to a more dedicated support system!

We'll be closing our Forum support from 10th June, 2020 and move to Email Support assistance.

  • If you are a WCFM premium add-ons user, contact us- here
  • Want to know more before buying our add-ons? Send Pre sale queries- here
  • If you are a WCFM free user, please open a support ticket at WordPress.org
  • For WCFM App related queries, reach us- here
From now the forum will be read-only!

Multi Vendor Marketplace Plugin | WCFM Marketplace Forums WCFM – Feature Request Allow adjusting the welcome email for new vendors via a filter

Viewing 0 reply threads
  • Author
    Posts
    • #124142

      In the file \wc-frontend-manager\controllers\vendors\wcfm-controller-vendors-new.php the 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_email for 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’] );
      `

Viewing 0 reply threads
  • You must be logged in to reply to this topic.