-
Notifications
You must be signed in to change notification settings - Fork 21
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 filter to be able to build custom shipping method rate handers. #2052
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## develop #2052 +/- ##
===========================================
+ Coverage 58.2% 58.3% +0.1%
+ Complexity 4119 4114 -5
===========================================
Files 454 454
Lines 17701 17680 -21
===========================================
+ Hits 10297 10301 +4
+ Misses 7404 7379 -25
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Thanks for the contribution. Overall looking good for me, just have a question regarding the need of sending the class instance as a parameter. |
@puntope I didn't need it specifically, was just trying err on the side of passing enough data to solve all potential use cases to filters, even if they aren't needed right away. Feel free to remove that parameter. |
Yes, I think is better to keep it as simpler as possible.
You can change it yourself in your side and I can then approve the PR. 👌 |
597b63a
to
a68b76d
Compare
@puntope I have removed it, should be all set. |
…ers. Allows other plugins to be able to extend the capabilities to handle shipping method rates.
a68b76d
to
5005c0c
Compare
Changes proposed in this Pull Request:
Allows other plugins to be able to extend the capabilities to handle shipping method rates.
This adds a
woocommerce_gla_handle_shipping_method_to_rates
filter to theshipping_method_to_rates
function for the unhandled shipping type method so that other plugins can implement handlers for those shipping methods.