Email templates¶
Every email Loveshack sends to subscribers and admins is edited in the Customizer under Appearance → Customize → E-Mails, with a live preview of the email while you type. LoveShack → Subscriptions links there from the sign-in messages settings.
The E-Mails panel¶
| Section | |
|---|---|
| Header | Avatar, site title, tagline, and social links shown at the top of every email. See Header and social links. |
| Footer | Copyright line, footer text, and site URL shown below every email. See Footer. |
| Sign-in link | The one-time sign-in link a subscriber asks for |
| Email confirmation | The link that confirms a new subscriber's address |
| Welcome | Sent once the address is confirmed |
| Post digest | The scheduled digest of new stream items. See Digest emails. |
| New subscriber (admin) | Sent to the new subscriber notification address |
| Admin sign-in blocked | Sent when an administrator asks for a passwordless link |
| Subscription changed | Sent after an upgrade, or when a scheduled downgrade takes effect |
| Subscription change scheduled | Sent when a downgrade is scheduled for the end of the period |
| Subscription price change | Sent when a changed tier price applies at the next renewal |
| Subscription cancelled | Sent on cancellation while paid time is left |
| Subscription ended | Sent on cancellation with no paid time left |
| Renewal failed | Sent when a renewal payment could not be charged |
| Friends & Family ending soon | Sent a week before a Friends & Family membership ends |
| Friends & Family ended | Sent when a Friends & Family membership has ended |
| Payment receipt | Sent for every successful payment |
Each email section has the same fields:
| Field | Effect |
|---|---|
| Subject | The subject line. Emptied, it falls back to the default. |
| Preview text | The line most inboxes show after the subject. Empty uses the default shown in the field; clear Show preview text to leave it out. |
| Heading | The headline above the message. Empty uses the default shown in the field; clear Show heading to leave it out. |
| Message | Plain text. Blank lines start a new paragraph and URLs become links. For the post digest this is an optional intro above the posts. |
| Button label | The text of the button below the message. The button's link is fixed per email. |
The message is also sent as the plain-text version of the email. A line holding only the button's URL is left out of the HTML version, where the button replaces it, and kept in the plain-text version.
Default texts as placeholders¶
Every text field starts empty and shows its default text as a grey placeholder. An empty field uses that default, so it keeps following the theme's defaults and their translations. Type into a field to replace the default, and empty it again to go back.
Emails that have a default preview text or heading add a Show preview text and a Show heading checkbox. Clear a checkbox to leave that part out of the email. The footer's Show footer text checkbox does the same for the footer text.
When a site updates to 1.4.6, texts that were saved with their default value are cleared so the placeholder shows, and a preview text, heading, or footer text that was saved empty to leave it out gets its checkbox cleared.
Extra texts¶
Some emails have texts beyond the five standard fields. They follow the same placeholder rules.
| Extra texts | |
|---|---|
| Welcome | The five sentences used for {digest_cadence}: every post, daily, weekly, monthly, and no emails |
| Post digest | Post link ("Read on site"), Settings note with {settings_link} and its Settings link text, and the plain-text Settings and Social links labels |
| Subscription changed | Proration sentence, used for {proration} when a difference was charged. {amount} is the charged amount. |
| Renewal failed | The two sentences used for {action}: one with a {date} deadline during a grace period, one without |
| Payment receipt | The opening sentence for a first payment, a renewal, and a one-time payment added as credit, and the labels of the payment details table. The message is the note below the table. |
Footer¶
The Footer section controls what appears below every email:
| Setting | Effect |
|---|---|
| Show copyright line | Include the line with the copyright sign and year |
| Copyright text override | Text after the year. Defaults to the site footer copyright text. |
| Footer text | Plain text below the copyright line, "Sent by {site_name}" by default. Blank lines start a new paragraph and URLs become links. Placeholders: {site_name}, {site_url}, {year}. Empty uses the default shown in the field; clear Show footer text to leave it out. |
| Show site URL | Include the site's address as the last line |
The footer text is also added to the plain-text version of every email. With all three parts off, the footer is left out entirely.
Placeholders¶
Placeholders work in every field and are listed in each section. {site_name}
is available everywhere and uses the email site name from the subscriber
settings, or the WordPress site title.
| Placeholders | |
|---|---|
| Sign-in link | {login_link}, {expires_minutes} |
| Email confirmation | {confirm_link}, {expires_hours} |
| Welcome | {site_url}, {digest_cadence} (the sentence describing how often digests arrive) |
| Post digest | {count}, {post_count} (for example "3 new posts") |
| New subscriber (admin) | {subscriber_email}, {user_id}, {manage_link} |
| Admin sign-in blocked | {login_link} |
| Subscription changed | {tier}, {price}, {proration}, {settings_link} |
| Subscription change scheduled | {tier}, {price}, {date}, {settings_link} |
| Subscription price change | {tier}, {price}, {date}, {settings_link} |
| Subscription cancelled | {date}, {settings_link} |
| Subscription ended | {settings_link} |
| Renewal failed | {provider}, {action}, {settings_link} |
| Friends & Family ending soon | {tier}, {date}, {subscribe_link} |
| Friends & Family ended | {tier}, {subscribe_link} |
| Payment receipt | {amount}, {tier}, {paid_on}, {reference} |
Preview and test emails¶
Opening an email section switches the Customizer preview to that email, filled with sample data. The post digest uses your three latest stream posts. Changes show up in the preview before you publish them. The HTML and Plain text buttons switch between the two versions of the email, and closing the panel returns the preview to the page you were on.
Send test email sends the open email to your own address, with your
unpublished changes and a [Test] prefix on the subject. Links in previews and
test emails are samples: they do not sign anyone in or confirm an address.
Defaults¶
Texts you never changed follow the theme's defaults and their translations. The sign-in message starts from the template saved on the subscriber settings page before emails moved to the Customizer.
For developers¶
Emails are built by lss_build_email() in inc/subscribers/email-content.php,
which both the senders and the preview use. The lss_email_types filter adds or
changes email types and their default texts, and lss_prepared_email adjusts a
built email before it is sent or previewed. See
Hooks and filters.