Skip to content

Commit

Permalink
feat: add checkout blocks to order metadata
Browse files Browse the repository at this point in the history
feat: add checkout blocks to order metadata
  • Loading branch information
fabiano-mallmann authored Oct 28, 2024
2 parents a74bbc1 + decf81c commit 10c1460
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace Pagarme\Core\Kernel\Services;

use Automattic\WooCommerce\Blocks\Utils\CartCheckoutUtils;
use Exception;
use PagarmeCoreApiLib\APIException;
use PagarmeCoreApiLib\Configuration;
Expand Down Expand Up @@ -171,6 +172,7 @@ private function getRequestMetaData($orderRequest)
$metadata->moduleVersion = $versionService->getModuleVersion();
$metadata->coreVersion = $versionService->getCoreVersion();
$metadata->platformVersion = $versionService->getPlatformVersion();
$metadata->checkoutBlocks = CartCheckoutUtils::is_checkout_block_default();
if($this->hasCreditCardInPayments($orderRequest->payments) && !empty(MPSetup::getInstallmentType())){
$metadata->interestType = MPSetup::getInstallmentType();
}
Expand Down

0 comments on commit 10c1460

Please sign in to comment.