Problem with free item
-
Hello,
i found a problem with your plugin when in the cart there is a product free
on submit order i get this error:
2023/02/05 09:30:46 [error] 85807#85807: *39628 FastCGI sent in stderr: “PHP message: PHP Fatal error: Uncaught DivisionByZeroError: Division by zero in /www/xxxxx/public/wp-content/plugins/integration-adyen-woocommerce/includes/payment-methods/class-abstract-gateway.php:723
so i go to class-abstract-gateway.php:723 and i fix in this way:
if ($price_incl_tax) { $tax_percentage = Service_Util::format_amount(number_format($tax_amount / $price_incl_tax * 100, 2, '.', '')); }else{ $tax_percentage=Service_Util::format_amount(number_format(0 , 2, '.', '')); }
is correct?
thank you
- The topic ‘Problem with free item’ is closed to new replies.