Take bundle child products quantity instead of parent product quantity (compatibility for WooCommerc

Use bundle child products' quantities instead of the parent product's quantity (compatibility for WooCommerce Product Bundles).

add_filter('advanced_woo_discount_rules_include_cart_item_to_count_quantity', function($take_count, $cart_item){
    if(isset($cart_item['bundled_items']) && !empty($cart_item['bundled_items'])){
        $take_count = false;
    }
    return $take_count;
}, 100, 2);