This repository was archived by the owner on Feb 23, 2024. It is now read-only.
Product Query: Unify data structure for tax_query
and meta_query
#7745
Labels
block-type: product-query
Issues related to/affecting all product-query variations.
type: enhancement
The issue is a request for an enhancement.
Is your feature request related to a problem? Please describe.
In Product Query, we're using different data structures for partial
tax_query
andmeta_query
objects:In
get_stock_status_query()
andget_filter_by_price_query()
, themeta_query
key holds an array containing query data (key, value, compare).woocommerce-blocks/src/BlockTypes/ProductQuery.php
Lines 258 to 266 in 9b79613
woocommerce-blocks/src/BlockTypes/ProductQuery.php
Lines 401 to 407 in 9b79613
Same for tax_query in
get_filter_by_attributes_query()
:woocommerce-blocks/src/BlockTypes/ProductQuery.php
Lines 450 to 455 in 9b79613
But in
get_filter_by_stock_status_query()
, themeta_query
key holds an array containing a nested array which contains query data:woocommerce-blocks/src/BlockTypes/ProductQuery.php
Lines 481 to 492 in 9b79613
Describe the solution you'd like
We should unify the way we return
tax_query
andmeta_query
data. We could go either way but should use only one.Additional context
This will be solved by #7697. I raise this issue to explain the reason for returned data changes in #7697. cc @gigitux @sunyatasattva
The text was updated successfully, but these errors were encountered: