We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Está gerando erro no desconto para boleto, para corrigir fiz estas alterações:
arquivo class-wc-gerencianet-boleto.php
linha 238 case 'fee': if ( strpos( $item->get_name(), '% de desconto no boleto' ) !== false ) { $order->remove_item( $item_id ); $order->save(); // Salva as alterações feitas no pedido } else{ $newFee = array( 'name' => __( 'Taxas', Gerencianet_I18n::getTextDomain() ), 'amount' => 1, 'value' => (int)$this->gn_price_format($item->get_total()), ); $orderTotal += (int)$this->gn_price_format($item->get_total()); $items[] = $newFee; } break;
linha 260 case 'coupon': $newDiscount = array( 'type' => 'currency', 'value' => (int)$this->gn_price_format($item->get_discount()), ); $discount = $newDiscount; $orderTotal -= (int)$this->gn_price_format($item->get_discount()); break;
linha 329: if ( $this->get_option( 'gn_billet_discount_shipping' ) == 'total' ) { if ( isset( $shipping[0]['value'] ) ) { $discount_gn = round(( $orderTotal + $shipping[0]['value'] ) * ( intval( $this->get_option( 'gn_billet_discount' ) ) / 100 ), 0, PHP_ROUND_HALF_UP); $discount['value'] += $discount_gn; } else { $discount_gn = round( ( $orderTotal ) * ( intval( $this->get_option( 'gn_billet_discount' ) ) / 100 ), 0, PHP_ROUND_HALF_UP ); $discount['value'] += $discount_gn; } $discountMessage = ' no valor total da compra'; } else { $discount_gn = round( $orderTotal * ( intval( $this->get_option( 'gn_billet_discount' ) ) / 100 ), 0, PHP_ROUND_HALF_UP ); $discount['value'] += $discount_gn; $discountMessage = ' no valor total dos produtos (frete não incluso)'; }
linha 355: if ( $order_item_id ) { wc_add_order_item_meta( $order_item_id, '_fee_amount', -$discount_gn / 100, true ); wc_add_order_item_meta( $order_item_id, '_line_total', -$discount_gn / 100, true ); $order->set_total( ($orderTotal / 100) - ( $discount_gn / 100 ) ); $order->save(); }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Está gerando erro no desconto para boleto, para corrigir fiz estas alterações:
arquivo class-wc-gerencianet-boleto.php
The text was updated successfully, but these errors were encountered: