Skip to content

fix: correct submit button text on change-payment-method page#4654

Open
jason10lee wants to merge 1 commit into
trunkfrom
fix/braintree-change-payment-button-text
Open

fix: correct submit button text on change-payment-method page#4654
jason10lee wants to merge 1 commit into
trunkfrom
fix/braintree-change-payment-button-text

Conversation

@jason10lee
Copy link
Copy Markdown
Contributor

All Submissions:

Changes proposed in this Pull Request:

The "Change Payment" modal on the My Account subscription page shows "Place order" as its submit button text. This fixes it to read "Update payment method", matching the label used elsewhere in the My Account payment flow.

Closes NPPM-2655.

How to test the changes in this Pull Request:

  1. Set up a site with WooCommerce Subscriptions and a payment gateway that supports the change-payment-method flow (e.g., Braintree or Stripe).
  2. Create or locate an active subscription for a test user.
  3. Log in as that user and navigate to My Account → Subscriptions.
  4. Click the three-dot menu on a subscription and select "Update payment method".
  5. Verify the submit button in the modal reads "Update payment method" (not "Place order").
  6. Navigate to a normal checkout page (e.g., add a product to cart and proceed to checkout).
  7. Verify the checkout button still displays its expected text ("Place order", "Donate now", or "Change subscription" depending on cart contents).

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?

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes the submit button label shown in the WooCommerce Subscriptions “change payment method” modal checkout flow so it no longer displays the generic checkout text (“Place order”), and instead matches the rest of the My Account payment update UI.

Changes:

  • Hooks woocommerce_order_button_text within the My Account customizations to override the checkout submit label for the change-payment-method flow.
  • Adds a small helper method that returns “Update payment method” when the request is identified as the payment-method-change checkout.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jason10lee jason10lee marked this pull request as ready for review April 10, 2026 21:24
@jason10lee jason10lee requested a review from a team as a code owner April 10, 2026 21:24
@jason10lee jason10lee added the [Status] Needs Review The issue or pull request needs to be reviewed label Apr 10, 2026
@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 Apr 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[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.

3 participants