Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reader Activation: customizable verification email #1929

Merged
merged 12 commits into from
Aug 30, 2022
Merged

Conversation

adekbadek
Copy link
Member

All Submissions:

Changes proposed in this Pull Request:

Two closely related changes:

  • Redesign of the verification email
  • Enabling customization of the verification email (sent when a reader registers)

Default email design:

image

How to test the changes in this Pull Request:

  1. Since this changeset contains a refactor of the Reader Revenue email, test the post-Stripe-donation email flow:
    1. Make a donation with Stripe configured as the RR platform, observe the email is sent
    2. Edit the post-donation email, observe it's sent as the updated version
  2. With Reader Activation enabled, register as a new reader
  3. Observe an email is sent, with the updated design
  4. Visit Engagement wizard, "Reader Activation" screen, "Emails" section
  5. Edit the "Verification" email
  6. In a new session, register as a new reader. Observe the updated email is sent

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you successfully ran tests with your changes locally?

@adekbadek adekbadek added [Status] Needs Review The issue or pull request needs to be reviewed Reader Activation labels Aug 24, 2022
@adekbadek adekbadek requested a review from a team as a code owner August 24, 2022 07:27
Copy link
Contributor

@dkoo dkoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few issues and non-blocking suggestions below. Other items which don't pertain to specific parts of the code:

  • Clicking the full-screen close button from the editor (WordPress logo in the upper-right corner) brings you to a standard WP post list UI for the Newspack Emails CPT. We should use this hook to redirect to the proper Newspack wizard UI instead.
  • The instructions shown in the "Instructions" sidebar panel still mainly related to the Stripe receipt emails, which might be confusing for Reader Activation-related emails. Perhaps this should be a part of each email type's config so that we can show different instructions based on email type?

includes/emails/class-emails.php Outdated Show resolved Hide resolved
includes/class-magic-link.php Show resolved Hide resolved
includes/reader-revenue/class-stripe-connection.php Outdated Show resolved Hide resolved
@thomasguillot
Copy link
Contributor

Not for this PR but something to maybe keep in mind, I've been working on a simple clean design for all these emails (still WIP)

But here's what I was thinking:

Gmail - White Background

Gmail - Coloured Background

Explanations

@adekbadek
Copy link
Member Author

@dkoo

The instructions shown in the "Instructions" sidebar panel still mainly related to the Stripe receipt emails […] Perhaps this should be a part of each email type's config

But it is! This is how the instructions look like for the verification email:

image

@adekbadek adekbadek requested a review from dkoo August 25, 2022 12:03
@dkoo
Copy link
Contributor

dkoo commented Aug 26, 2022

But it is! This is how the instructions look like for the verification email:

You're right! I must have been looking at the wrong tab.

Copy link
Contributor

@dkoo dkoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the revisions! One more thing that feels kind of strange about the close button behavior.

$post_type_mapping = [
Emails::POST_TYPE => [
'base' => 'edit',
'url' => esc_url( admin_url( 'admin.php?page=newspack' ) ),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is better than landing on the WP CPT post list for emails, but I wonder if we should add some more logic to redirect to the specific wizard page based on the email type? Engagement > Reader Activation for the verification email, and Reader Revenue > Emails for the Stripe reciept. If we're not consolidating the emails into a single wizard then it feels weird to be dumped back to the main Newspack dashboard page after closing out of the editor.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@thomasguillot suggested elsewhere to use a hybrid approach to the email post type – link to specific emails where applicable, but also have a single "all emails" view. This will enable discoverability, but also allow to e.g. update branding on all emails from one place.

I think the issue with the redirect is non-blocking, and the redirect can be updated to point to the "all emails" view once we have it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm okay with punting this to a new PR when we have an "All Emails" view.

@adekbadek adekbadek requested a review from dkoo August 29, 2022 09:03
@github-actions github-actions bot added [Status] Approved The pull request has been reviewed and is ready to merge and removed [Status] Needs Review The issue or pull request needs to be reviewed labels Aug 29, 2022
@adekbadek adekbadek merged commit d293701 into master Aug 30, 2022
@adekbadek adekbadek deleted the feat/ras-emails branch August 30, 2022 07:57
matticbot pushed a commit that referenced this pull request Sep 6, 2022
# [1.90.0-alpha.2](v1.90.0-alpha.1...v1.90.0-alpha.2) (2022-09-06)

### Bug Fixes

* allow Register block to be edited even if RAS is not enabled ([#1962](#1962)) ([649f47b](649f47b))
* **emails:** editor message ([62dec52](62dec52))
* localized reader auth error messages ([#1948](#1948)) ([fb58a7f](fb58a7f))
* **reader-activation:** send payment contact metadata only if RA is enabled ([#1957](#1957)) ([3e14777](3e14777))
* **registration-block:** allow any markup in the success state ([977e77a](977e77a))
* **registration-block:** fix empty success state ([272aee5](272aee5))
* **WooCommerce:** error notice text color ([#1954](#1954)) ([2e4b95f](2e4b95f))

### Features

* **ac-metadata:** send SSO provider name as "NP_Connected Account" field ([56b6597](56b6597))
* **ac-metadata:** send Stripe customer LTV as "NP_Total Paid" field ([5f6da59](5f6da59))
* after account deletion message ([2547b76](2547b76))
* **analytics:** prevent sending NTG newsletter event if subscribing to master list ([#1946](#1946)) ([806a8b0](806a8b0))
* custom messaging for reader without password ([#1965](#1965)) ([a584b59](a584b59))
* give each registration form a unique ID ([#1953](#1953)) ([29fb515](29fb515))
* **google-sitekit:** prevent excluding logged-in users from GA if RA is enabled ([#1960](#1960)) ([3b18bcc](3b18bcc))
* **reader-activation:** customizable account deletion, password reset emails ([#1938](#1938)) ([c121e5c](c121e5c))
* **reader-activation:** customizable verification email ([#1929](#1929)) ([d293701](d293701))
* **reader-activation:** handle global auth success in registration block ([debf5d2](debf5d2))
* **reader-activation:** improve password reset flow ([a05a9b6](a05a9b6))
* **registration-block:** hidden input for subscription ([#1949](#1949)) ([fc4f4d5](fc4f4d5))
* reorganise reader registration header section ([#1967](#1967)) ([f3f54e1](f3f54e1))
* update billing portal copy ([8040b80](8040b80))
* update reader-facing language on auth fail ([#1974](#1974)) ([a05ca37](a05ca37))
* update woocommerce account message/notice ([#1956](#1956)) ([db18b95](db18b95))
* use universal "from" email, customizable magic link email ([#1937](#1937)) ([3b269aa](3b269aa))
@matticbot
Copy link
Contributor

🎉 This PR is included in version 1.90.0-alpha.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

matticbot pushed a commit that referenced this pull request Sep 14, 2022
# [1.90.0](v1.89.1...v1.90.0) (2022-09-14)

### Bug Fixes

* **ac-master-list:** handle empty lists ([cfabb5a](cfabb5a))
* add check to only change theme if not empty ([#1978](#1978)) ([b9835f1](b9835f1))
* allow Register block to be edited even if RAS is not enabled ([#1962](#1962)) ([649f47b](649f47b))
* **emails:** don't create post if pluggable functions are not available ([#1979](#1979)) ([d8aac4f](d8aac4f))
* **emails:** editor message ([62dec52](62dec52))
* **google-oauth:** missing email message ([#1925](#1925)) ([93260a3](93260a3))
* horizontal scrollbar on auth modal ([#1919](#1919)) ([08a7bb6](08a7bb6))
* if logging in from an overlay prompt, dismiss the prompt after login ([#1927](#1927)) ([999437d](999437d))
* localized reader auth error messages ([#1948](#1948)) ([fb58a7f](fb58a7f))
* post-logout messaging ([#1934](#1934)) ([11e6917](11e6917))
* prefix WC My Account actions so we can decide which hooks to support ([#1963](#1963)) ([0fa8c0a](0fa8c0a))
* **reader-activation:** send payment contact metadata only if RA is enabled ([#1957](#1957)) ([3e14777](3e14777))
* register and auth form tweaks ([#1935](#1935)) ([3b76d3f](3b76d3f))
* **registration-block:** allow any markup in the success state ([977e77a](977e77a))
* **registration-block:** column layout in editor ([#1920](#1920)) ([f1ae0c5](f1ae0c5))
* **registration-block:** fix empty success state ([272aee5](272aee5))
* show My Account messages using custom messaging instead of WC messaging ([#1932](#1932)) ([c9802fe](c9802fe))
* **stripe:** handle WC-originating Stripe transactions ([674b278](674b278))
* **WooCommerce:** error notice text color ([#1954](#1954)) ([2e4b95f](2e4b95f))

### Features

* **ac-metadata:** send SSO provider name as "NP_Connected Account" field ([56b6597](56b6597))
* **ac-metadata:** send Stripe customer LTV as "NP_Total Paid" field ([5f6da59](5f6da59))
* after account deletion message ([2547b76](2547b76))
* **analytics:** prevent sending NTG newsletter event if subscribing to master list ([#1946](#1946)) ([806a8b0](806a8b0))
* custom messaging for reader without password ([#1965](#1965)) ([a584b59](a584b59))
* disable mailchimp-for-woocommerce plugin campaign tracking cookie ([#618](#618)) ([99310cb](99310cb))
* for donations via a prompt, add prompt ID to event label ([#1928](#1928)) ([4704cfd](4704cfd))
* give each registration form a unique ID ([#1953](#1953)) ([29fb515](29fb515))
* **google-sitekit:** prevent excluding logged-in users from GA if RA is enabled ([#1960](#1960)) ([3b18bcc](3b18bcc))
* honeypot trap for auth and registration forms ([#1896](#1896)) ([d5d713c](d5d713c))
* move have account text below SSO and adjust font-size ([#1917](#1917)) ([869913d](869913d))
* new option for minimum donation amount ([#1895](#1895)) ([0b9618b](0b9618b))
* reader account deletion and ESP sync options ([#1884](#1884)) ([b9fd209](b9fd209))
* **reader-activation:** check lists in auth modal by default ([#1933](#1933)) ([77bce1d](77bce1d))
* **reader-activation:** customizable account deletion, password reset emails ([#1938](#1938)) ([c121e5c](c121e5c))
* **reader-activation:** customizable verification email ([#1929](#1929)) ([d293701](d293701))
* **reader-activation:** handle global auth success in registration block ([debf5d2](debf5d2))
* **reader-activation:** improve password reset flow ([a05a9b6](a05a9b6))
* **registration-block:** hidden input for subscription ([#1949](#1949)) ([fc4f4d5](fc4f4d5))
* reorganise reader registration header section ([#1967](#1967)) ([f3f54e1](f3f54e1))
* set from details for password reset emails ([#1926](#1926)) ([8b8607a](8b8607a))
* **stripe:** lookup stripe customer ID on registration ([#1860](#1860)) ([490cd97](490cd97)), closes [#1853](#1853)
* subscription metadata for ESP; Stripe webhook creation tweak ([#1859](#1859)) ([e094b15](e094b15))
* title and description for registration block ([#1924](#1924)) ([1c9fba6](1c9fba6))
* update billing portal copy ([8040b80](8040b80))
* update reader-facing language on auth fail ([#1974](#1974)) ([a05ca37](a05ca37))
* update woocommerce account message/notice ([#1956](#1956)) ([db18b95](db18b95))
* use reCAPTCHA to secure all Reader Activation-related forms ([#1910](#1910)) ([cc8ef79](cc8ef79))
* use universal "from" email, customizable magic link email ([#1937](#1937)) ([3b269aa](3b269aa))
* Woo sync to ActiveCampaign ([#1968](#1968)) ([630b24e](630b24e))
@matticbot
Copy link
Contributor

🎉 This PR is included in version 1.90.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Reader Activation released on @alpha released [Status] Approved The pull request has been reviewed and is ready to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants