From d6a130bb2489ef69e7594e2d08b355586c57c04e Mon Sep 17 00:00:00 2001
From: Philipp Stracker
Date: Wed, 27 Nov 2024 17:19:56 +0100
Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20Remove=20duplicates=20from?=
=?UTF-8?q?=20=E2=80=9Ccomponents=E2=80=9D=20param?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
modules/ppcp-button/src/Assets/SmartButton.php | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/modules/ppcp-button/src/Assets/SmartButton.php b/modules/ppcp-button/src/Assets/SmartButton.php
index c116796b9..45e71d647 100644
--- a/modules/ppcp-button/src/Assets/SmartButton.php
+++ b/modules/ppcp-button/src/Assets/SmartButton.php
@@ -1596,7 +1596,9 @@ document.querySelector("#payment").before(document.querySelector(".ppcp-messages
*
* @param array $components The array of components already registered.
*/
- return apply_filters( 'woocommerce_paypal_payments_sdk_components_hook', $components );
+ return array_unique(
+ (array) apply_filters( 'woocommerce_paypal_payments_sdk_components_hook', $components )
+ );
}
/**