Skip to content

Comments

Subscribers: Show error message when gifting to an email-only subscriber#101543

Merged
allilevine merged 2 commits intotrunkfrom
add/gift-subscription-no-user-error
Mar 24, 2025
Merged

Subscribers: Show error message when gifting to an email-only subscriber#101543
allilevine merged 2 commits intotrunkfrom
add/gift-subscription-no-user-error

Conversation

@allilevine
Copy link
Member

@allilevine allilevine commented Mar 18, 2025

Related to https://github.com/Automattic/loop/issues/593

Proposed Changes

  • Show an error notice when attempting to add a gift subscription to an email-only subscriber (no user id). Currently, nothing happens when you click.
Screen Shot 2025-03-17 at 1 07 21 PM Screen Shot 2025-03-18 at 2 24 53 PM

Why are these changes being made?

  • It's not clear to the user why the gift subscription modal isn't opening.

Testing Instructions

  • Set up a site with paid newsletter tiers and gifts enabled. See: PCYsg-qBq-p2 -- the gifts can be enabled via a blog sticker. Or, I can add you to my test site.
  • Add both an email-only subscriber and an email associated with a Dotcom account.
  • Click Actions > Gift a subscription next to the email-only subscriber. You should see the error.
  • Click Actions > Gift a subscription next to the Dotcom subscriber. You should see a modal and be able to gift them a subscription.

Pre-merge Checklist

  • Has the general commit checklist been followed? (PCYsg-hS-p2)
  • Have you written new tests for your changes?
  • Have you tested the feature in Simple (P9HQHe-k8-p2), Atomic (P9HQHe-jW-p2), and self-hosted Jetpack sites (PCYsg-g6b-p2)?
  • Have you checked for TypeScript, React or other console errors?
  • Have you used memoizing on expensive computations? More info in Memoizing with create-selector and Using memoizing selectors and Our Approach to Data
  • Have we added the "[Status] String Freeze" label as soon as any new strings were ready for translation (p4TIVU-5Jq-p2)?
    • For UI changes, have we tested the change in various languages (for example, ES, PT, FR, or DE)? The length of text and words vary significantly between languages.
  • For changes affecting Jetpack: Have we added the "[Status] Needs Privacy Updates" label if this pull request changes what data or activity we track or use (p4TIVU-aUh-p2)?

@allilevine allilevine self-assigned this Mar 18, 2025
@github-actions
Copy link

github-actions bot commented Mar 18, 2025

@allilevine allilevine marked this pull request as ready for review March 18, 2025 18:25
@matticbot
Copy link
Contributor

matticbot commented Mar 18, 2025

Here is how your PR affects size of JS and CSS bundles shipped to the user's browser:

Sections (~68 bytes added 📈 [gzipped])

Details
name         parsed_size           gzip_size
subscribers       +177 B  (+0.0%)      +68 B  (+0.0%)

Sections contain code specific for a given set of routes. Is downloaded and parsed only when a particular route is navigated to.

Legend

What is parsed and gzip size?

Parsed Size: Uncompressed size of the JS and CSS files. This much code needs to be parsed and stored in memory.
Gzip Size: Compressed size of the JS and CSS files. This much data needs to be downloaded over network.

Generated by performance advisor bot at iscalypsofastyet.com.

@matticbot
Copy link
Contributor

This PR modifies the release build for the following Calypso Apps:

For info about this notification, see here: PCYsg-OT6-p2

  • notifications
  • wpcom-block-editor

To test WordPress.com changes, run install-plugin.sh $pluginSlug add/gift-subscription-no-user-error on your sandbox.

@allilevine allilevine requested a review from a team March 18, 2025 18:42
@matticbot matticbot added the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Mar 18, 2025
Copy link
Contributor

@spsiddarthan spsiddarthan left a comment

Choose a reason for hiding this comment

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

Screenshot 2025-03-19 at 1 28 39 PM

Screenshot 2025-03-19 at 1 28 51 PMW
Screenshot 2025-03-19 at 1 29 01 PM
Screenshot 2025-03-19 at 1 29 04 PM

Thanks for fixing this - works well.

@allilevine allilevine added the [Status] String Freeze Add the [Status] String Freeze label to your PR to ensure new strings are translated before merging label Mar 19, 2025
@a8ci18n
Copy link

a8ci18n commented Mar 19, 2025

This Pull Request is now available for translation here: https://translate.wordpress.com/deliverables/17306134

Some locales (Hebrew) have been temporarily machine-translated due to translator availability. All other translations are usually ready within a few days. Untranslated and machine-translated strings will be sent for translation next Monday and are expected to be completed by the following Friday.

Thank you @allilevine for including a screenshot in the description! This is really helpful for our translators.

@a8ci18n
Copy link

a8ci18n commented Mar 23, 2025

Translation for this Pull Request has now been finished.

@allilevine allilevine force-pushed the add/gift-subscription-no-user-error branch from 829bcc6 to 35f86e4 Compare March 24, 2025 15:30
@allilevine allilevine merged commit 2d57920 into trunk Mar 24, 2025
13 checks passed
@allilevine allilevine deleted the add/gift-subscription-no-user-error branch March 24, 2025 17:00
@github-actions github-actions bot removed [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. [Status] String Freeze Add the [Status] String Freeze label to your PR to ensure new strings are translated before merging labels Mar 24, 2025
claudiucelfilip pushed a commit that referenced this pull request Mar 25, 2025
…ber (#101543)

* Show error message when gifting to an email-only subscriber.

* Clean up logic.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants