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
Brexit and VAT refactor #24943
Brexit and VAT refactor #24943
Conversation
… VAT handling. Add new WC_Countries::get_vat_countries for returning countries supporting VAT.
…m to WC_Countries::get_vat_countries
…Countries::get_vat_countries
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.
Looks good to me overall, but there is one problem that needs to be addressed that I mentioned in an inline comment.
Besides that, I wonder if we should keep GB
in the list of european countries in this PR. This way, we can merge it for WC 3.9 as just the refactor is already an improvement and should make it easier for those that need to adjust their store using the filters provided here when Brexit happens and before we release a new WooCommerce version. Then we can address removing GB
on a separate PR when the time comes. What do you think?
I'm fixing the conflicts. |
I have updated this PR to use |
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 think we can improve this one a bit, please see below.
All Submissions:
Changes proposed in this Pull Request:
This PR does a couple of things. First it refactors the VAT functionality currently built into the WC_Countries::get_european_union_countries method by deprecating it and introducing a new method WC_Countries::get_vat_countries and updating all calls to the get_european_union_countries method for VAT purposes with the new method.
Secondly, it removes GB from the get_european_union_countries method and then add them to the get_vat_countries method since GB still uses VAT.
It is important to note that this PR is still in progress and should not be merged before Brexit officially happens. From what I could see there should be no effect on having GB remain as part of the get_european_union_countries in core since we only use that for determining to use VAT or TAX, but it could have an effect on plugins that relies on the method for specific functionality relating to EU countries, for that there is a filter currently in place that can be utilised to remove GB should it be needed in these plugins.
Closes #24666
Other information:
Changelog entry