From e7e5f10f83d7759e75d5430273460aac7acbea09 Mon Sep 17 00:00:00 2001
From: Pedro Silva
Date: Fri, 17 Nov 2023 16:31:47 +0000
Subject: [PATCH] Add block cart and block express checkout to default buttons
locations.
---
modules/ppcp-wc-gateway/services.php | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/modules/ppcp-wc-gateway/services.php b/modules/ppcp-wc-gateway/services.php
index 8c0f4474a..68d4ed172 100644
--- a/modules/ppcp-wc-gateway/services.php
+++ b/modules/ppcp-wc-gateway/services.php
@@ -1372,7 +1372,9 @@ return array(
);
},
'wcgateway.button.default-locations' => static function( ContainerInterface $container ): array {
- return array_keys( $container->get( 'wcgateway.settings.pay-later.messaging-locations' ) );
+ $button_locations = $container->get( 'wcgateway.button.locations' );
+ unset( $button_locations['mini-cart'] );
+ return array_keys( $button_locations );
},
'wcgateway.settings.pay-later.button-locations' => static function( ContainerInterface $container ): array {
$settings = $container->get( 'wcgateway.settings' );