-
Notifications
You must be signed in to change notification settings - Fork 69
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
Add Compatibility Service #7778
Conversation
Test the buildOption 1. Jetpack Beta
Option 2. Jurassic Ninja - available for logged-in A12s🚀 Launch a JN site with this branch 🚀 ℹ️ Install this Tampermonkey script to get more options. Build info:
Note: the build is updated when a new commit is pushed to this PR. |
Size Change: 0 B Total Size: 1.26 MB ℹ️ View Unchanged
|
…ity_Service to the WCPay namespace.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this new compatibility service, Jesse! The code looks great and makes sense. No changes from me. Tests pass.
…r usage in checks.
This reverts commit 2174292e6baca913decd2891ac063715911fc98e.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested with the server component together, all work as expected. LGTM
Changes proposed in this Pull Request
This PR adds the Compatibility Service that will allow us to check what version of WooCommerce core is being used alongside WooPayments for faster updates when there may be compatibility issues between versions.
Compatibility_Service
class in theWCPay
namespace.update_compatibility_data
, which is called by thewoocommerce_payments_account_refreshed
action. This action is called when the account object is refreshed on the client side, so every 2 hours if admins are active, or 24 hours if only customers are active.update_compatibility_data
method will call theWC_Payments_API_Client
method with the same name. It passes along an array that includes the WooCommerce core version, or a notice if the constant is not defined.update_compatibility_data
method toWC_Payments_API_Client
. This handles POSTing the data passed to it to theCOMPATIBILITY_API
endpoint on the server.get_onboarding_po_eligible
was missingtest_
as the prefix, which caused it not to run, so I updated that.Testing instructions
npm run changelog
to add a changelog file, choosepatch
to leave it empty if the change is not significant. You can add multiple changelog files in one PR by running this command a few times.Post merge