From 6baebd1e11e70fe231e94c058fe9a7cd28a4284c Mon Sep 17 00:00:00 2001 From: Joshua T Flowers Date: Mon, 15 Jun 2020 08:43:22 +0300 Subject: [PATCH] Check for enabled methods before payment task completion (https://github.com/woocommerce/woocommerce-admin/pull/4530) --- .../client/task-list/tasks/payments/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/woocommerce-admin/client/task-list/tasks/payments/index.js b/plugins/woocommerce-admin/client/task-list/tasks/payments/index.js index 0022be63105..46543f6518c 100644 --- a/plugins/woocommerce-admin/client/task-list/tasks/payments/index.js +++ b/plugins/woocommerce-admin/client/task-list/tasks/payments/index.js @@ -239,8 +239,8 @@ class Payments extends Component { const currentMethod = this.getCurrentMethod(); const { busyMethod, enabledMethods, recommendedMethod } = this.state; const { methods, query, requesting } = this.props; - const configuredMethods = methods.filter( - ( method ) => method.isConfigured + const hasEnabledMethods = Object.keys( enabledMethods ).filter( + ( method ) => enabledMethods[ method ] ).length; if ( currentMethod ) { @@ -348,7 +348,7 @@ class Payments extends Component { ); } ) }
- { configuredMethods.length === 0 ? ( + { ! hasEnabledMethods ? (