Emails

Email Handlers

Email content on the suitcase are handled by 3 systems:

Profile Press - Handles new user emails

Sensei - Handles Course Completion Emails

Mailchimp - Weekly getting started emails after signup.

All emails (except for those sent from mailchimp) will be wrapped in the Suitcase branding by a function called ”format_mail” in the theme’s functions.php file. The content of the header and footer can be edited in email-template-top.php & email-template-bottom.php in the child-theme root directory.

Subject Lines:

The subject line for the User completed course email is set in the functions file by the filter:

add_filter( 'sensei_email_subject', 'my_custom_sensei_email_subject', 10, 2 );

Sensei & WPML Email translations

Sensei is one of those plugins that potentially need special treatment for email languages, say a teacher grades a quiz and the plugin sends a notification to the student, but the student speaks a different language than the teacher, using standard wordpress functions the student would receive an email in the language that the current wordpress user is in, so WPML has an api to allow users to set a language preference in their WP dashboard, I didn’t want to bother the users with that setting since we don’t need any emails sent from teachers at this point all emails are triggered by the users themselves so I disabled this functionality in Sensei by commenting out these lines in plugins/woothemes-sensei/includes/wpml/class-sensei-wpml.php :

add_action( 'sensei_before_mail', array( $this, 'sensei_before_mail' ) );
add_action( 'sensei_after_sending_email', array( $this, 'sensei_after_sending_email' ) );

Last updated

Was this helpful?