diff --git a/plugins/woocommerce-admin/client/homescreen/mobile-app-modal/index.tsx b/plugins/woocommerce-admin/client/homescreen/mobile-app-modal/index.tsx index 2232b27182a..624289f5e7c 100644 --- a/plugins/woocommerce-admin/client/homescreen/mobile-app-modal/index.tsx +++ b/plugins/woocommerce-admin/client/homescreen/mobile-app-modal/index.tsx @@ -5,6 +5,8 @@ import { useState, useEffect, useCallback } from '@wordpress/element'; import { Guide } from '@wordpress/components'; import { useSearchParams } from 'react-router-dom'; import { updateQueryString } from '@woocommerce/navigation'; +import { useDispatch } from '@wordpress/data'; +import { OPTIONS_STORE_NAME } from '@woocommerce/data'; /** * Internal dependencies @@ -26,6 +28,7 @@ export const MobileAppModal = () => { const [ guideIsOpen, setGuideIsOpen ] = useState( true ); const { state, jetpackConnectionData } = useJetpackPluginState(); + const { updateOptions } = useDispatch( OPTIONS_STORE_NAME ); const [ pageContent, setPageContent ] = useState< React.ReactNode >(); const [ searchParams ] = useSearchParams(); @@ -99,6 +102,9 @@ export const MobileAppModal = () => { { guideIsOpen && ( { + updateOptions( { + woocommerce_admin_dismissed_mobile_app_modal: 'yes', + } ); // clear the search params that we use so that the URL is clean updateQueryString( { diff --git a/plugins/woocommerce/changelog/add-get-mobile-app-task b/plugins/woocommerce/changelog/add-get-mobile-app-task new file mode 100644 index 00000000000..7363ed29a93 --- /dev/null +++ b/plugins/woocommerce/changelog/add-get-mobile-app-task @@ -0,0 +1,4 @@ +Significance: minor +Type: add + +Added the get mobile app task to the additional tasklist diff --git a/plugins/woocommerce/src/Admin/Features/OnboardingTasks/TaskLists.php b/plugins/woocommerce/src/Admin/Features/OnboardingTasks/TaskLists.php index 63440273774..31cd3a68bf6 100644 --- a/plugins/woocommerce/src/Admin/Features/OnboardingTasks/TaskLists.php +++ b/plugins/woocommerce/src/Admin/Features/OnboardingTasks/TaskLists.php @@ -51,6 +51,7 @@ class TaskLists { 'Appearance', 'AdditionalPayments', 'ReviewShippingOptions', + 'GetMobileApp', ); /** @@ -145,6 +146,7 @@ class TaskLists { ), 'tasks' => array( 'AdditionalPayments', + 'GetMobileApp', ), ) ); @@ -182,6 +184,7 @@ class TaskLists { ), 'tasks' => array( 'AdditionalPayments', + 'GetMobileApp', ), 'event_prefix' => 'extended_tasklist_', ) diff --git a/plugins/woocommerce/src/Admin/Features/OnboardingTasks/Tasks/GetMobileApp.php b/plugins/woocommerce/src/Admin/Features/OnboardingTasks/Tasks/GetMobileApp.php new file mode 100644 index 00000000000..f74ab644c19 --- /dev/null +++ b/plugins/woocommerce/src/Admin/Features/OnboardingTasks/Tasks/GetMobileApp.php @@ -0,0 +1,73 @@ +