[5.x]: All tax categories and shipping categories showing on variant edit page
What happened?
Description
I have 2 tax categories and 2 product types, each tax category is setup to be only available for 1 product type, But when editing a product, still both tax categories are available to select as there hasn't been done any filtering in to query those categories (https://github.com/craftcms/commerce/blob/5.x/src/base/Purchasable.php#L1067)
Steps to reproduce
- create different product types
- Add tax categories and make them available for a single product type
- all tax categories are still selectable
Expected behavior
Only the tax categories that are available for the product type should be shown
Actual behavior
all tax categories are show and selectable
Craft CMS version
5.2.4.1
Craft Commerce version
5.0.11.1
PHP version
8.3.8
Operating system and version
Ubuntu 24.04
Database type and version
mysql 8.0
Image driver and version
No response
Installed plugins and versions
No response
Hi @white-lukas
Thank you for reporting this, we were able to reproduce the issue and have subsequently pushed up a fix.
This fix will be included in the next release of Commerce.
Thanks!
Hi
Commerce version 5.0.12 has been released with this update included.
Thanks!