From decf81cc11e86cad74060bfb7099e54cb3fa2134 Mon Sep 17 00:00:00 2001 From: RafaMelazzo Date: Fri, 25 Oct 2024 15:41:19 -0300 Subject: [PATCH] feat: add checkout blocks to order metadata --- .../ecommerce-module-core/src/Kernel/Services/APIService.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vendor/pagarme/ecommerce-module-core/src/Kernel/Services/APIService.php b/vendor/pagarme/ecommerce-module-core/src/Kernel/Services/APIService.php index 5611cc92..3a9f2cc9 100644 --- a/vendor/pagarme/ecommerce-module-core/src/Kernel/Services/APIService.php +++ b/vendor/pagarme/ecommerce-module-core/src/Kernel/Services/APIService.php @@ -2,6 +2,7 @@ namespace Pagarme\Core\Kernel\Services; +use Automattic\WooCommerce\Blocks\Utils\CartCheckoutUtils; use Exception; use PagarmeCoreApiLib\APIException; use PagarmeCoreApiLib\Configuration; @@ -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(); }