commerce icon indicating copy to clipboard operation
commerce copied to clipboard

[5.x]: All tax categories and shipping categories showing on variant edit page

Open white-lukas opened this issue 1 year ago • 1 comments

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

  1. create different product types
  2. Add tax categories and make them available for a single product type
  3. 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

white-lukas avatar Jul 01 '24 12:07 white-lukas

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!

nfourtythree avatar Jul 10 '24 09:07 nfourtythree

Hi

Commerce version 5.0.12 has been released with this update included.

Thanks!

nfourtythree avatar Jul 11 '24 15:07 nfourtythree