Check subtotal less than condition even when cart has no item

Evaluate subtotal conditions even when the cart has no items.

add_filter('advanced_woo_discount_rules_is_conditions_passed', function($result, $rule_object, $rule){
    $conditions = $rule_object->getConditions();
    $cart = null;
    if(function_exists('WC')){
        $cart = WC()->cart->get_cart();
    }
    if(empty($cart) && !empty($conditions) && count((array)$conditions) == 1)
    foreach ($conditions as $condition) {
        $type = isset($condition->type) ? $condition->type : NULL;
        if($type == 'cart_subtotal' && ($condition->options->operator == 'less_than_or_equal' || $condition->options->operator == 'less_than')){
            return true;
        }
    }
    return $result;
}, 10, 3);