Fix reference to navigation package and fix transient notices so it looks at core/notices as well as core/notices2 (https://github.com/woocommerce/woocommerce-admin/pull/5583)

Co-authored-by: Rebecca Scott <me@becdetat.com>
This commit is contained in:
Bec Scott 2020-11-13 11:21:06 +10:00 committed by GitHub
parent 0b721d4461
commit fde504f9d6
2 changed files with 5 additions and 4 deletions

View File

@ -46,10 +46,11 @@ TransientNotices.propTypes = {
export default compose(
withSelect( ( select ) => {
// NOTE: This uses core/notices2, if this file is copied back upstream
// to Gutenberg this needs to be changed back to core/notices.
const notices = select( 'core/notices2' ).getNotices();
// to Gutenberg this needs to be changed back to just core/notices.
const notices = select( 'core/notices' ).getNotices();
const notices2 = select( 'core/notices2' ).getNotices();
return { notices };
return { notices: notices.concat( notices2 ) };
} ),
withDispatch( ( dispatch ) => ( {
// NOTE: This uses core/notices2, if this file is copied back upstream

View File

@ -241,7 +241,7 @@ class OnboardingTasks {
return;
}
wp_enqueue_script( 'onboarding-product-notice', Loader::get_url( 'wp-admin-scripts/onboarding-product-notice', 'js' ), array( 'wc-navigation', 'wp-i18n', 'wp-data' ), WC_ADMIN_VERSION_NUMBER, true );
wp_enqueue_script( 'onboarding-product-notice', Loader::get_url( 'wp-admin-scripts/onboarding-product-notice', 'js' ), array( 'wp-i18n', 'wp-data' ), WC_ADMIN_VERSION_NUMBER, true );
}
/**