-
Notifications
You must be signed in to change notification settings - Fork 10.7k
Include Customer VAT Exemption Status in Variable Product Price Cache Key #30889
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
Conversation
barryhughes
left a comment
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.
LGTM!
Code looks good, works as per test instructions.
|
Hi @barryhughes, thanks for merging this pull request. Please take a look at these follow-up tasks you may need to perform:
|
|
Hi guys! I am thos one posting the original issue. We now found another scenario that triggers this problem with the transients displaying prices without VAT. Our client has a store that uses user roles to display discounted prices for wholesale/retailers. Once a retailer logs in, immediately the cross-out prices and the discounted price shows without VAT, even all the settings are set to include VAT. What makes it worse, once the prices are saved in the transients, any clients regardless of the user role are now able to see and checkout with the VAT0% pricing that creates a huge loss of profits. Clearing the transients fixes the issue temporarily once incorrect prices are discovered, but this requires a huge amount of manual work and constantly monitoring the store for the bug to happen. Due to client confidentiality I am not able to share the link here publicly, but if you need, we have a staging version of the site available for troubleshooting/ testing. Just let me know how to share those with you in private. |
|
Hi @masahrpro, Since the user role isn't used by core WooCommerce in pricing, I think the solution should be to use the If you are using an extension from our marketplace for role based pricing, let us know so we can surface the issue to the developers. |
|
Thanks for the tip @jeffstieler ! We will try that. |
All Submissions:
Changes proposed in this Pull Request:
Closes #25255.
This PR adds logic to alter the Variable Product price hash (cache key) when the current customer is VAT exempt.
How to test the changes in this Pull Request:
(Lovingly plagiarized from the issue)
Other information:
Changelog entry
FOR PR REVIEWER ONLY: