Skip to content

Commit

Permalink
fix:correção na lógica de verificação do carrinho para retornar verda…
Browse files Browse the repository at this point in the history
…deiro se o total do carrinho for 0 ou se o carrinho tiver um teste
  • Loading branch information
lucastgama committed Mar 6, 2024
1 parent 45ec75b commit b1cd6b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/VindiWoocommerce.php
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ public function add_gateway($methods)
*/
public function filter_woocommerce_cart_needs_payment($needs_payment, $cart)
{
if (floatval($cart->total) == 0 && $this->cart_has_trial($cart)) {
if (floatval($cart->total) == 0 || $this->cart_has_trial($cart)) {
return true;
}

Expand Down

0 comments on commit b1cd6b2

Please sign in to comment.