• This function found here woocustomizer/includes/inc/woocommerce.php:1497
    has a bug when it comes to strings and integers, this is the fix, please replace it for the next version

    function wcz_show_discount_amount_saved() {
    if ( is_checkout() && !get_option( 'wcz-checkout-show-discamount', woocustomizer_library_get_default( 'wcz-checkout-show-discamount' ) ) ) {
    return;
    }
    $wcz_discount = 0;
    foreach ( WC()->cart->get_cart() as $cart_item_key => $values ) {
    $product = $values['data'];
    if ( $product->is_on_sale() ) {
    $regular_price = intval($product->get_regular_price());
    $sale_price = intval($product->get_sale_price());
    $discount = ($regular_price - $sale_price) * $values['quantity'];
    $wcz_discount += $discount;
    }
    }
    if ( $wcz_discount > 0 ) {
    $wcz_savedtxt = ( is_checkout() ? get_option( 'wcz-checkout-discamount-txt', woocustomizer_library_get_default( 'wcz-checkout-discamount-txt' ) ) : get_option( 'wcz-cart-discamount-txt', woocustomizer_library_get_default( 'wcz-cart-discamount-txt' ) ) );
    echo '' . esc_html( $wcz_savedtxt ) . '' . wc_price( $wcz_discount + WC()->cart->get_discount_total() ) . '';
    }
    }

You must be logged in to reply to this topic.