mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-04 08:47:23 +08:00
Remove objects without keys
This commit is contained in:
parent
d44fafe415
commit
8545689e78
1 changed files with 4 additions and 3 deletions
|
@ -96,12 +96,13 @@ export const usePaymentMethods = () => {
|
|||
|
||||
export const usePaymentMethodsPayPalCheckout = () => {
|
||||
const { paypal, venmo, payLater, creditCard } = useHooks();
|
||||
|
||||
const paymentMethodsPayPalCheckout = [
|
||||
paypal,
|
||||
venmo,
|
||||
payLater,
|
||||
creditCard,
|
||||
];
|
||||
].filter( ( item ) => Object.keys( item ).length !== 0 );
|
||||
|
||||
return {
|
||||
paymentMethodsPayPalCheckout,
|
||||
|
@ -115,7 +116,7 @@ export const usePaymentMethodsOnlineCardPayments = () => {
|
|||
fastlane,
|
||||
applePay,
|
||||
googlePay,
|
||||
];
|
||||
].filter( ( item ) => Object.keys( item ).length !== 0 );
|
||||
|
||||
return {
|
||||
paymentMethodsOnlineCardPayments,
|
||||
|
@ -147,7 +148,7 @@ export const usePaymentMethodsAlternative = () => {
|
|||
multibanco,
|
||||
pui,
|
||||
oxxo,
|
||||
];
|
||||
].filter( ( item ) => Object.keys( item ).length !== 0 );
|
||||
|
||||
return {
|
||||
paymentMethodsAlternative,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue