mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-08-31 06:52:50 +08:00
♻️ Remove duplicates from “components” param
This commit is contained in:
parent
2ac074dc2b
commit
d6a130bb24
1 changed files with 3 additions and 1 deletions
|
@ -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 )
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue