Skip to content

Add batch upsert/delete actions and reducer for shipping rates/times to communicate with batch APIs #411

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

Merged
merged 2 commits into from
Apr 6, 2021

Conversation

eason9487
Copy link
Member

Changes proposed in this Pull Request:

This PR implemented a part of issue #358 and depends on #410. It needs to change the shared data lib that corresponding to others' work, so it's presented separately to facilitate collaboration.

Detailed test instructions:

  1. Head to the MC onboarding flow: /wp-admin/admin.php?page=wc-admin&path=%2Fgoogle%2Fsetup-mc
  2. The upsert/deletion of shipping rates and times should work as before

❗ Please note that the migrations of the consuming side aren't included in this PR, so the UI may still appear bouncy problems and too many connection errors.

@eason9487 eason9487 requested a review from a team April 1, 2021 07:19
@eason9487 eason9487 self-assigned this Apr 1, 2021
Copy link
Contributor

@tomalec tomalec left a comment

Choose a reason for hiding this comment

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

Reviewed the code. Tested locally. Works fine.

Comment on lines +32 to +43
const getNextStateForShipping = ( state ) => {
return {
...state,
mc: {
...state.mc,
shipping: {
...state.mc.shipping,
},
},
};
};

Copy link
Contributor

Choose a reason for hiding this comment

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

❔ Can we use that in RECEIVE_ as well, to solve #270, or would you prefer it to be a separate PR?

Copy link
Member Author

Choose a reason for hiding this comment

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

The getNextStateForShipping function was an interim solution to keep the problem from spreading for the time being. Even so, I think we can apply them on RECEIVE_ first, and it would be good to open a separate PR next week to deal with it quickly. Because I will start AFK tomorrow. 😆 🎉 (And please feel free if anyone wants to deal with that 🙏 👍 )

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