From 5c34f2f78bcef143d14f2a6479a5ef40f7770d6e Mon Sep 17 00:00:00 2001
From: Philipp Stracker
Date: Tue, 25 Mar 2025 16:46:52 +0100
Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Hide=20empty=20payment=20method=20s?=
=?UTF-8?q?ections?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Settings/Tabs/TabPaymentMethods.js | 43 ++++++++++++-------
1 file changed, 27 insertions(+), 16 deletions(-)
diff --git a/modules/ppcp-settings/resources/js/Components/Screens/Settings/Tabs/TabPaymentMethods.js b/modules/ppcp-settings/resources/js/Components/Screens/Settings/Tabs/TabPaymentMethods.js
index a85fd7c73..be6be657d 100644
--- a/modules/ppcp-settings/resources/js/Components/Screens/Settings/Tabs/TabPaymentMethods.js
+++ b/modules/ppcp-settings/resources/js/Components/Screens/Settings/Tabs/TabPaymentMethods.js
@@ -54,6 +54,13 @@ const TabPaymentMethods = () => {
const merchant = CommonHooks.useMerchant();
const { canUseCardPayments } = OnboardingHooks.useFlags();
+ const showCardPayments =
+ methods.cardPayment.length > 0 &&
+ merchant.isBusinessSeller &&
+ canUseCardPayments;
+
+ const showApms = methods.apm.length > 0;
+
return (
{
onTriggerModal={ setActiveModal }
methodsMap={ methodsMap }
/>
- { merchant.isBusinessSeller && canUseCardPayments && (
+
+ { showCardPayments && (
{
methodsMap={ methodsMap }
/>
) }
-
+
+ { showApms && (
+
+ ) }
{ activeModal && (