PluginProbe
Product Labels, Quick View, Buy Now, Pre-Orders, Frequently Bought Together & More for WooCommerce – Merchant / 2.3.2
Product Labels, Quick View, Buy Now, Pre-Orders, Frequently Bought Together & More for WooCommerce – Merchant v2.3.2
2.3.2 2.3.1 2.3.0 2.2.8 2.2.7 trunk 1.10.0 1.10.1 1.10.2 1.10.3 1.10.4 1.10.5 1.11.0 1.11.1 1.11.2 1.6 1.7 1.8 1.8.1 1.8.2 1.8.3 1.9.0 1.9.1 1.9.10 1.9.11 All 60 releases
← All changes | inc/modules/pre-orders/classes/class-pre-orders-rules.php +2 -2 2.3.02.3.2 View file →
@@ -176,9 +176,9 @@
176 176 if ( isset( $taxonomy_map[ $trigger ] ) ) {
177 177 $taxonomy = $taxonomy_map[ $trigger ];
178 178 $needed_slugs = array();
179 179 if ( 'category' === $trigger ) {
180 - $needed_slugs = $rule['category_slugs'] ?? array();
180 + $needed_slugs = merchant_maybe_expand_categories( $rule['category_slugs'] ?? array(), $rule );
181 181 } elseif ( 'tags' === $trigger ) {
182 182 $needed_slugs = $rule['tag_slugs'] ?? array();
183 183 } elseif ( 'brands' === $trigger ) {
184 184 $needed_slugs = $rule['brand_slugs'] ?? array();
@@ -523,9 +523,9 @@
523 523 }
524 524
525 525 // 2. Exclude Categories
526 526 if ( ! empty( $rule['exclude_categories_toggle'] ) && 'category' !== $trigger ) {
527 - $slugs = $rule['excluded_categories'] ?? array();
527 + $slugs = merchant_maybe_expand_categories( $rule['excluded_categories'] ?? array(), $rule );
528 528 if ( ! empty( $slugs ) && has_term( $slugs, 'product_cat', $_product_id ) ) {
529 529 return true;
530 530 }
531 531 }