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 "undefined method" error when connecting Stripe #3368

Merged
merged 2 commits into from
Aug 20, 2024

Conversation

annemirasol
Copy link
Contributor

@annemirasol annemirasol commented Aug 20, 2024

Fixes #3357

Changes proposed in this Pull Request:

In #3357, we abstracted Stripe settings handling, and added new getter/setter methods in includes/class-wc-stripe-helper.php. This PR fixes a line that uses the incorrect (non-existent) method name for updating Stripe settings, to fix an "undefined method" error encountered when connecting a Stripe account.

Testing instructions

Code review: verify that the update_main_stripe_settings method exists (in includes/class-wc-stripe-helper.php).

  1. On a fresh install, go to WooCommerce > Settings > Payments > Stripe (Finish set up).
  2. Connect your test Stripe account by clicking on Connect or create Stripe account, choosing the test account, and clicking Connect.
  3. Verify that the connection process finishes, instead of getting an "undefined method" error page (see screen capture). You should get redirected to the Stripe settings page, with Stripe enabled, on success.
Screenshot 2024-08-20 at 11 43 36 AM
  • Covered with tests (or have a good reason not to test in description ☝️)
  • Added changelog entry in both changelog.txt and readme.txt (or does not apply)
  • Tested on mobile (or does not apply)

Post merge

@annemirasol annemirasol requested a review from wjrosa August 20, 2024 17:53
@annemirasol annemirasol self-assigned this Aug 20, 2024
Copy link
Contributor

@wjrosa wjrosa left a comment

Choose a reason for hiding this comment

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

Good job on your first change! Thanks for fixing this and for addressing the issues I mentioned over Slack. All good 👍

@annemirasol annemirasol merged commit 7eec27e into develop Aug 20, 2024
35 checks passed
@annemirasol annemirasol deleted the fix/3357-undefined-method branch August 20, 2024 19:43
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.

2 participants