♻️ Remove duplicates from “components” param

This commit is contained in:
Philipp Stracker 2024-11-27 17:19:56 +01:00
parent 2ac074dc2b
commit d6a130bb24
No known key found for this signature in database

View file

@ -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 )
);
}
/**