From b4322595c587edae333672717e10f17f95367ef9 Mon Sep 17 00:00:00 2001 From: Ilyas Foo Date: Mon, 26 Aug 2024 16:53:05 +0800 Subject: [PATCH] Hide payments recommendation when no extensions are available (#50949) * Hide payment recommendations when no extensions are available * Changelog --- .../client/payments/payment-recommendations.tsx | 4 ++++ .../fix-hide-payments-recommendation-when-no-extensions | 4 ++++ 2 files changed, 8 insertions(+) create mode 100644 plugins/woocommerce/changelog/fix-hide-payments-recommendation-when-no-extensions diff --git a/plugins/woocommerce-admin/client/payments/payment-recommendations.tsx b/plugins/woocommerce-admin/client/payments/payment-recommendations.tsx index 1425d26fab0..798eb01fde5 100644 --- a/plugins/woocommerce-admin/client/payments/payment-recommendations.tsx +++ b/plugins/woocommerce-admin/client/payments/payment-recommendations.tsx @@ -205,6 +205,10 @@ const PaymentRecommendations: React.FC = () => { }; } ); + if ( pluginsList.length === 0 ) { + return null; + } + return ( diff --git a/plugins/woocommerce/changelog/fix-hide-payments-recommendation-when-no-extensions b/plugins/woocommerce/changelog/fix-hide-payments-recommendation-when-no-extensions new file mode 100644 index 00000000000..169df53a6f7 --- /dev/null +++ b/plugins/woocommerce/changelog/fix-hide-payments-recommendation-when-no-extensions @@ -0,0 +1,4 @@ +Significance: patch +Type: fix + +Hide payment recommendations when no extensions are available