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

Store: Only send back modified values back to the payment method API #21986

Merged
merged 1 commit into from
Feb 15, 2018

Conversation

justinshreve
Copy link
Contributor

Fixes #21670.

This PR modifies the action list code to only send back modified values to the REST API, instead of the full payment method object.

It also clears out updates state from our edits object on successful save (so that you can make further changes without passing back existing edits over the API) like we do in other places like products state.

To Test:

  • Run npm run test-client client/extensions/woocommerce/state and make sure all tests pass.
  • Go to http://calypso.localhost:3000/store/settings/payments/:store
  • Modify various payment methods. This includes titles, descriptions, settings (like BACs accounts), and toggling enabled/disabled for various payment methods. Make sure after saving, all values are displayed correctly.
  • Do a hard refresh to verify your settings saved correctly and that there was no data loss.
  • Do the above once more with different settings to make sure everything is 💯 .

@justinshreve justinshreve added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. Store [Tests] Includes Tests labels Jan 31, 2018
@justinshreve justinshreve self-assigned this Jan 31, 2018
@justinshreve justinshreve requested a review from a team January 31, 2018 00:55
@matticbot
Copy link
Contributor

@justinshreve justinshreve force-pushed the update/payment-settings branch from 171e962 to e5513cb Compare February 15, 2018 19:21
@justinshreve justinshreve force-pushed the update/payment-settings branch from e5513cb to f87d393 Compare February 15, 2018 19:22
Copy link
Contributor

@timmyc timmyc left a comment

Choose a reason for hiding this comment

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

Testing out well for me, thanks for making this change 🌟

@timmyc timmyc added [Status] Ready to Merge and removed [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Feb 15, 2018
@justinshreve justinshreve merged commit c0f4ef2 into master Feb 15, 2018
@justinshreve justinshreve deleted the update/payment-settings branch March 14, 2018 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants