Fix a bug where wc-tracks was not loaded as a dependency. (https://github.com/woocommerce/woocommerce-admin/pull/5645)

Fixes woocommerce/woocommerce-admin#5644
This commit is contained in:
Sam Seay 2020-11-17 13:55:08 +13:00 committed by GitHub
parent dc0f3b70f3
commit 625dbe0ae5
1 changed files with 1 additions and 1 deletions

View File

@ -252,7 +252,7 @@ class OnboardingTasks {
public static function add_onboarding_homepage_notice_admin_script( $hook ) {
global $post;
if ( 'post.php' === $hook && 'page' === $post->post_type && isset( $_GET[ self::ACTIVE_TASK_TRANSIENT ] ) && 'homepage' === $_GET[ self::ACTIVE_TASK_TRANSIENT ] ) { // phpcs:ignore csrf ok.
wp_enqueue_script( 'onboarding-homepage-notice', Loader::get_url( 'wp-admin-scripts/onboarding-homepage-notice', 'js' ), array( 'wc-navigation', 'wp-i18n', 'wp-data' ), WC_ADMIN_VERSION_NUMBER, true );
wp_enqueue_script( 'onboarding-homepage-notice', Loader::get_url( 'wp-admin-scripts/onboarding-homepage-notice', 'js' ), array( 'wc-navigation', 'wp-i18n', 'wp-data', 'wc-tracks' ), WC_ADMIN_VERSION_NUMBER, true );
}
}