Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Shop page: Filter Products by Price block only works with Number of decimals set to 2 #6226

Closed
dinhtungdu opened this issue Apr 12, 2022 · 0 comments · Fixed by #6229
Closed
Assignees
Labels
block: filter by price Issues related to the Filter by Price block. focus: FSE Work related to prepare WooCommerce for FSE. type: bug The issue/PR concerns a confirmed bug.

Comments

@dinhtungdu
Copy link
Member

Describe the bug

#6146 makes the Filter Products by Price block work with PHP templates. But currently, it only works with Number of decimals set to 2. When the setting is set to another value, the block return incorrect min and max price in the URL.

To reproduce

Steps to reproduce the behavior:

  1. Set Number of decimals set to 0.
  2. With a block theme, go to Appearance > Editor > Template > Product Catalog.
  3. Add the Filter Products by Price block above the product grid and set Filter Button attribute to true.
  4. Change the values of the price slider.
  5. See the page reloads but the price in the URL is incorrect.

Expected behavior

The Filter Products by Price should work with any value of Number of decimals.

Screenshots

image

@dinhtungdu dinhtungdu added the type: bug The issue/PR concerns a confirmed bug. label Apr 12, 2022
@dinhtungdu dinhtungdu self-assigned this Apr 12, 2022
@dinhtungdu dinhtungdu added block: filter by price Issues related to the Filter by Price block. focus: FSE Work related to prepare WooCommerce for FSE. labels Apr 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
block: filter by price Issues related to the Filter by Price block. focus: FSE Work related to prepare WooCommerce for FSE. type: bug The issue/PR concerns a confirmed bug.
Projects
None yet
1 participant