# Round the discount by using the PHP ceil function (rounds up 1.1 into 2)

```php
// Round the discount by using the PHP ceil function, and it rounds up 1.1 into 2
add_filter('advanced_woo_discount_rules_discount_prices_of_product', function ($discount_prices, $product, $quantity, $cart_item){
    if(isset($discount_prices['discounted_price'])){
        $discount_prices['discounted_price'] = ceil($discount_prices['discounted_price']);
    }
    if(isset($discount_prices['discounted_price_with_tax'])){
        $discount_prices['discounted_price_with_tax'] = ceil($discount_prices['discounted_price_with_tax']);
    }
    if(isset($discount_prices['discount_lines'])){
        foreach ($discount_prices['discount_lines'] as $key => $value){
            if($key !== 'non_applied'){
                $line_discount = $discount_prices['discount_lines'][$key]['discounted_price'];
                $discount_prices['discount_lines'][$key]['discounted_price'] = ceil($line_discount);
            }
        }
    }
    return $discount_prices;
}, 10, 4);
```
