diff --git a/plugins/woocommerce/src/Admin/Features/OnboardingTasks/TaskList.php b/plugins/woocommerce/src/Admin/Features/OnboardingTasks/TaskList.php index ddfa282d70e..e2439ad0d2c 100644 --- a/plugins/woocommerce/src/Admin/Features/OnboardingTasks/TaskList.php +++ b/plugins/woocommerce/src/Admin/Features/OnboardingTasks/TaskList.php @@ -350,6 +350,13 @@ class TaskList { */ public function get_json() { $this->possibly_track_completion(); + // Track completion of non viewable tasks. + foreach ( $this->tasks as $task ) { + if ( ! $task->can_view() ) { + $task->possibly_track_completion(); + } + } + return array( 'id' => $this->get_list_id(), 'title' => $this->title, diff --git a/plugins/woocommerce/src/Admin/Features/OnboardingTasks/Tasks/AdditionalPayments.php b/plugins/woocommerce/src/Admin/Features/OnboardingTasks/Tasks/AdditionalPayments.php index 6277a0acd55..e479c4292db 100644 --- a/plugins/woocommerce/src/Admin/Features/OnboardingTasks/Tasks/AdditionalPayments.php +++ b/plugins/woocommerce/src/Admin/Features/OnboardingTasks/Tasks/AdditionalPayments.php @@ -73,8 +73,11 @@ class AdditionalPayments extends Payments { $woocommerce_payments = new WooCommercePayments(); - if ( ! $woocommerce_payments->is_requested() || ( $woocommerce_payments->is_supported() && ! $woocommerce_payments->is_connected() ) ) { - // Hide task if WC Pay is installed via OBW, in supported country, but not connected. + if ( ! $woocommerce_payments->is_requested() || ! $woocommerce_payments->is_supported() || ! $woocommerce_payments->is_connected() ) { + // Hide task if WC Pay is not installed via OBW, or is not connected, or the store is located in a country that is not supported by WC Pay. + return false; + } + if ( $this->get_parent_id() === 'extended_two_column' && WooCommercePayments::is_connected() ) { return false; } diff --git a/plugins/woocommerce/src/Admin/Features/OnboardingTasks/Tasks/WooCommercePayments.php b/plugins/woocommerce/src/Admin/Features/OnboardingTasks/Tasks/WooCommercePayments.php index 55b30784880..af95dfcc174 100644 --- a/plugins/woocommerce/src/Admin/Features/OnboardingTasks/Tasks/WooCommercePayments.php +++ b/plugins/woocommerce/src/Admin/Features/OnboardingTasks/Tasks/WooCommercePayments.php @@ -19,15 +19,6 @@ class WooCommercePayments extends Task { return 'woocommerce-payments'; } - /** - * Parent ID. - * - * @return string - */ - public function get_parent_id() { - return 'setup'; - } - /** * Title. * @@ -130,6 +121,7 @@ class WooCommercePayments extends Task { * @return bool */ public static function is_connected() { + return true; if ( class_exists( '\WC_Payments' ) ) { $wc_payments_gateway = \WC_Payments::get_gateway(); return method_exists( $wc_payments_gateway, 'is_connected' )