Division by zero in class-wc-cielo-helper.php
-
Ao realizar uma compra, estou recebendo o seguinte warning nos emails de “novo peido” e na tela de confirma??o da compra:
Warning: Division by zero in /home/autoescolavetor/public_html/wp-content/plugins/cielo-woocommerce/includes/class-wc-cielo-helper.php on line 392
O trecho de código na linha citada é:
if ( 'client' == $this->installment_type && $quantity >= $this->interest ) { $interest_rate = $this->get_valid_value( $this->interest_rate ) / 100; $interest_total = $order_total * ( $interest_rate / ( 1 - ( 1 / pow( 1 + $interest_rate, $quantity ) ) ) ); $interest_order_total = $interest_total * $quantity; if ( $credit_total < $interest_total ) { $credit_total = $interest_total; $credit_interest = sprintf( __( 'with interest of %s%% a.m. Total: %s', 'cielo-woocommerce' ), $this->get_valid_value( $this->interest_rate ), sanitize_text_field( woocommerce_price( $interest_order_total ) ) ); } }
Viewing 10 replies - 1 through 10 (of 10 total)
Viewing 10 replies - 1 through 10 (of 10 total)
- The topic ‘Division by zero in class-wc-cielo-helper.php’ is closed to new replies.