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

Fix: Resolve issue with "Update Subscription" button being always disabled for Stripe #7578

Merged
merged 1 commit into from
Oct 22, 2024

Conversation

pauloiankoski
Copy link
Contributor

@pauloiankoski pauloiankoski commented Oct 21, 2024

Resolves GIVE-1326

Description

This PR fixes an issue where the “Update Subscription” button was always disabled, preventing users from updating subscription amounts. The issue affected both the Option Based Form Editor (V2) and the Visual Form Builder (VFB) forms.

The problem stemmed from a recently introduced id property in the subscription status object, which will only be available in the next release of Give Recurring. To ensure backwards compatibility, this fix adds a fallback to use a lowercased version of the label property when id is not present.

With this adjustment, the “Update Subscription” button will be correctly enabled, allowing users to update subscription amounts as expected, regardless of whether their data includes the new id property.

Affects

Manage Subscription on the Donor Dashboard

Testing Instructions

  1. Create a subscription.
  2. Go to the Donor Dashboard.
  3. Click the “Manage Subscription” link.
  4. The “Update Subscription” button should now be enabled (the subscription must have an active status).

Pre-review Checklist

  • Acceptance criteria satisfied and marked in related issue
  • Relevant @unreleased tags included in DocBlocks
  • Includes unit tests
  • Reviewed by the designer (if follows a design)
  • Self Review of code and UX completed

Copy link
Contributor

@JoshuaHungDinh JoshuaHungDinh left a comment

Choose a reason for hiding this comment

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

Good to go!

@jonwaldstein jonwaldstein changed the base branch from develop to release/3.17.1 October 21, 2024 20:07
@jonwaldstein jonwaldstein changed the base branch from release/3.17.1 to develop October 21, 2024 20:08
@jonwaldstein jonwaldstein changed the base branch from develop to release/3.17.1 October 21, 2024 20:08
@jonwaldstein jonwaldstein changed the base branch from release/3.17.1 to master October 21, 2024 20:08
…bility

Provide fallback to `subscription.payment.status.label.toLowerCase()` when `status.id` is not available. This ensures compatibility for customers who do not have the recently introduced `id` property in their subscription status data.
@jonwaldstein jonwaldstein force-pushed the fix/subscription-amount-update-button branch from bb031ff to f2203ff Compare October 21, 2024 20:09
Copy link
Member

@rickalday rickalday left a comment

Choose a reason for hiding this comment

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

Passed manual QA tests.

@jonwaldstein jonwaldstein changed the base branch from master to release/3.17.1 October 22, 2024 13:40
@jonwaldstein jonwaldstein merged commit 0f469fb into release/3.17.1 Oct 22, 2024
20 checks passed
@jonwaldstein jonwaldstein deleted the fix/subscription-amount-update-button branch October 22, 2024 13:40
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