-
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
misc: fix warning during plugin update due to problems with initialization #8728
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.25 MB ℹ️ View Unchanged
|
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.
I don't like adding more methods to WC_Pament_Gateway_WCPay
but I guess it is our only option until #7464 is resolved.
Agree @gpressutto5 I also don't like it and see it the only option for now. Another option would be to keep the duplicates detection logic within the controller, but this would also have its drawbacks and IMO they will be impacting more negatively compared to the changes in this PR. |
Closes #8731
Changes proposed in this Pull Request
#7464 describes the problem during plugin update when a new parameter is being added to the class's constructor during initialization. This PR is to fix one of the occurrences of this error, by removing the settings controller parameter and adding this parameter to be used through the gateway. Once #7464 is fixed, this PR should be reverted.
Testing instructions
7.5.3
)WooCommerce -> Status -> Logs -> fatal errors
entry exists and contains theArgumentCountError: Too few arguments to function WC_REST_Payments_Settings_Controller
Your Site is Experiencing a Technical Issue
7.5.3
fix/fatals-on-plugin-update
) [you can use this], use it to update the plugin on your store and confirm no more warnings during plugin updatefatal_errors
source underWooCommerce -> Status -> Logs
because noArgumentCountError
was thrownnpm 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