/** * External dependencies */ import { __ } from '@wordpress/i18n'; import { dispatch } from '@wordpress/data'; import domReady from '@wordpress/dom-ready'; /** * WooCommerce dependencies */ import { getAdminLink } from '@woocommerce/wc-admin-settings'; /** * Displays a notice after product creation. */ const showProductCompletionNotice = () => { dispatch( 'core/notices' ).createSuccessNotice( __( '🎉 Congrats on adding your first product!', 'woocommerce-admin' ), { id: 'WOOCOMMERCE_ONBOARDING_PRODUCT_NOTICE', actions: [ { url: getAdminLink( 'admin.php?page=wc-admin' ), label: __( 'Continue setup.', 'woocommerce-admin' ), }, ], } ); }; domReady( () => { showProductCompletionNotice(); } );