Skip to content
New issue

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

fix: corrige cotação para pedidos com produtos virtuais #202

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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