Skip to content

Commit

Permalink
fix: correct quote for orders with virtual products (#202)
Browse files Browse the repository at this point in the history
  • Loading branch information
JoaoPedro0000 authored Nov 6, 2024
1 parent 1fdca21 commit 678fca1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Services/CalculateShippingMethodService.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use Exception;
use MelhorEnvio\Helpers\MoneyHelper;
use MelhorEnvio\Helpers\ProductVirtualHelper;
use MelhorEnvio\Helpers\TimeHelper;
use MelhorEnvio\Models\ShippingService;
use MelhorEnvio\Helpers\PostalCodeHelper;
Expand Down Expand Up @@ -48,6 +49,8 @@ public function calculateShipping( $package, $code, $id, $company, $title, $taxE

$products = ( new CartWooCommerceService() )->getProducts();

$products = ProductVirtualHelper::removeVirtuals( $products );

if ( empty( $products ) ) {
$products = $package['contents'];
}
Expand Down
1 change: 1 addition & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ Pronto! o plugin do Melhor Envio está funcionando.
== Changelog ==
= 2.15.8 =
* Adiciona log no caso de falha em uma requisição.
* Corrige cotacao em compras com produtos virtuais.

= 2.15.7 =
* Corrige problema na busca do CEP.
Expand Down

0 comments on commit 678fca1

Please sign in to comment.