woocommerce/includes/widgets
Nestor Soriano 9de1306c21 Fix counters in nav filtering widgets for variable products.
After the change that registers variation attributes as terms
(in addition to reigstering them as post meta) it is now time
to modify the get_filtered_term_product_counts methods in
WC_Widget_Layered_Nav so that it works consistently for both
variable and non-variable products. The logic for the counters
is now as follows:

with OR operator:
- Simple products: count the attributes of all visible products
  (unchanged behavior).
- Variable products: count attributes corresponding to
  visible variations.

with AND operator:
- Simple products: count the attributes of visible products but only
  for products that have all the selected (unchanged behavior).
- Variable products: find all the products for which all the variations
  corresponding to the selected attributes exist and are visible,
  then count the attributes corresponding to the visible variations
  of those products.

A product is "visible" if it's published, not excluded for catalog,
and has stock. Additionally, a variable product will not be considered
visible if the parent product is not.
2020-07-28 08:55:55 +02:00
..
class-wc-widget-cart.php Check isset rather than empty so cart title can be removed 2019-04-18 13:10:42 +01:00
class-wc-widget-layered-nav-filters.php Fixed Coding Standard 2019-03-23 20:58:36 +01:00
class-wc-widget-layered-nav.php Fix counters in nav filtering widgets for variable products. 2020-07-28 08:55:55 +02:00
class-wc-widget-price-filter.php Extracted the repetitive Constants::get_constant( 'WC_VERSION' ) calls where possible 2020-02-04 14:02:57 -08:00
class-wc-widget-product-categories.php direct meta sort 2019-01-25 19:57:06 +00:00
class-wc-widget-product-search.php Fixed class-wc-widget-product-search.php PHPCS violations 2018-03-09 17:29:16 -03:00
class-wc-widget-product-tag-cloud.php Fix PEAR.Functions.FunctionCallSignature violations 2019-12-20 15:25:23 -03:00
class-wc-widget-products.php Prevent PHP notices in WooCommerce widgets using Gutenberg's Legacy Widget Block 2019-08-01 14:43:59 -03:00
class-wc-widget-rating-filter.php merge conflict 2019-02-08 13:08:55 +00:00
class-wc-widget-recent-reviews.php Fix PEAR.Functions.FunctionCallSignature violations 2019-12-20 15:25:23 -03:00
class-wc-widget-recently-viewed.php Prevent PHP notices in WooCommerce widgets using Gutenberg's Legacy Widget Block 2019-08-01 14:43:59 -03:00
class-wc-widget-top-rated-products.php Small fix 2020-01-21 18:03:01 +02:00