diff --git a/plugins/woocommerce-admin/client/marketplace/components/products/products.tsx b/plugins/woocommerce-admin/client/marketplace/components/products/products.tsx index 3b23df17cab..dc704b3d1de 100644 --- a/plugins/woocommerce-admin/client/marketplace/components/products/products.tsx +++ b/plugins/woocommerce-admin/client/marketplace/components/products/products.tsx @@ -12,6 +12,7 @@ import { Button } from '@wordpress/components'; import classnames from 'classnames'; import { addQueryArgs } from '@wordpress/url'; import { useSelect } from '@wordpress/data'; +import { ONBOARDING_STORE_NAME } from '@woocommerce/data'; /** * Internal dependencies @@ -68,6 +69,14 @@ export default function Products( props: ProductsProps ) { page: 'wc-admin', path: '/customize-store/design', } ); + const assemblerHubUrl = addQueryArgs( `${ ADMIN_URL }admin.php`, { + page: 'wc-admin', + path: '/customize-store/assembler-hub', + } ); + + const customizeStoreTask = useSelect( ( select ) => { + return select( ONBOARDING_STORE_NAME ).getTask( 'customize-store' ); + }, [] ); // Only show the "View all" button when on search but not showing a specific section of results. const showAllButton = props.showAllButton ?? false; @@ -155,6 +164,8 @@ export default function Products( props: ProductsProps ) { onClick={ () => { if ( ! isDefaultTheme ) { setIsModalOpen( true ); + } else if ( customizeStoreTask?.isComplete ) { + window.location.href = assemblerHubUrl; } else { window.location.href = customizeStoreDesignUrl; } diff --git a/plugins/woocommerce/changelog/45713-show-modal-when-cys-task-complete b/plugins/woocommerce/changelog/45713-show-modal-when-cys-task-complete new file mode 100644 index 00000000000..c11ad46bbd2 --- /dev/null +++ b/plugins/woocommerce/changelog/45713-show-modal-when-cys-task-complete @@ -0,0 +1,4 @@ +Significance: minor +Type: fix + +CYS - Go to the assembler when clicking to the "Design you own" button if the theme was already customized in the assembler. \ No newline at end of file