| @@ -221,8 +221,35 @@ | ||
| 221 | 221 | 'toggled_by' => 'exclusion', |
| 222 | 222 | 'usage_hint' => 'Products from these categories will NOT display the wishlist button. Dynamic: future products in the category are automatically excluded. Requires exclusion=true.', |
| 223 | 223 | ), |
| 224 | 224 | ), |
| 225 | + | |
| 226 | + array( | |
| 227 | + 'id' => 'include_subcategories', | |
| 228 | + 'type' => 'switcher', | |
| 229 | + 'title' => esc_html__( 'Include subcategories', 'merchant' ), | |
| 230 | + 'desc' => esc_html__( 'When enabled, selecting a parent category also applies to all of its child categories.', 'merchant' ), | |
| 231 | + 'default' => 0, | |
| 232 | + 'conditions' => array( | |
| 233 | + 'relation' => 'OR', | |
| 234 | + 'terms' => array( | |
| 235 | + array( | |
| 236 | + 'field' => 'inclusion', | |
| 237 | + 'operator' => '===', | |
| 238 | + 'value' => true, | |
| 239 | + ), | |
| 240 | + array( | |
| 241 | + 'field' => 'exclusion', | |
| 242 | + 'operator' => '===', | |
| 243 | + 'value' => true, | |
| 244 | + ), | |
| 245 | + ), | |
| 246 | + ), | |
| 247 | + 'ai_meta' => array( | |
| 248 | + 'semantic_group' => 'product_targeting', | |
| 249 | + 'usage_hint' => 'Enable so selected parent categories also cover their child categories, for both the include list and the exclude list. Off by default, which matches only the exact categories chosen.', | |
| 250 | + ), | |
| 251 | + ), | |
| 225 | 252 | ), |
| 226 | 253 | ), |
| 227 | 254 | array( |
| 228 | 255 | 'title' => esc_html__( 'Add To Wishlist Button Settings', 'merchant' ), |