diff --git a/admin/woocommerce-admin-init.php b/admin/woocommerce-admin-init.php index dd9e9df64bb..508b2d2f8d5 100644 --- a/admin/woocommerce-admin-init.php +++ b/admin/woocommerce-admin-init.php @@ -39,7 +39,7 @@ function woocommerce_admin_menu() { */ add_action( "admin_print_styles", 'woocommerce_admin_notices_styles' ); -function woocommerce_admin_notices() { +function woocommerce_admin_install_notice() { ?>
@@ -50,10 +50,16 @@ function woocommerce_admin_notices() { 0 || isset($_GET['install_woocommerce_pages']) || isset($_GET['skip_install_woocommerce_pages'])) return; - add_action( 'admin_notices', 'woocommerce_admin_notices' ); - wp_enqueue_style( 'woocommerce-activation', plugins_url( '/assets/css/wc-activation.css', dirname( __FILE__ ) ) ); + if ( get_option('woocommerce_installed')==1 ) { + + wp_enqueue_style( 'woocommerce-activation', plugins_url( '/assets/css/wc-activation.css', dirname( __FILE__ ) ) ); + + if (get_option('skip_install_woocommerce_pages')!=1 && woocommerce_get_page_id('shop')<1 && !isset($_GET['install_woocommerce_pages']) && !isset($_GET['skip_install_woocommerce_pages'])) { + add_action( 'admin_notices', 'woocommerce_admin_install_notice' ); + } + + } } diff --git a/admin/woocommerce-admin-settings.php b/admin/woocommerce-admin-settings.php index f68ebeee78e..3467b4d58ca 100644 --- a/admin/woocommerce-admin-settings.php +++ b/admin/woocommerce-admin-settings.php @@ -1075,10 +1075,15 @@ function woocommerce_settings() { update_option('woocommerce_installed', 0); - echo '
-

' . __( 'Like WooCommerce? Support us by leaving a rating!', 'woocommerce' ) . '

-

' . __( 'WooCommerce has been installed and setup. Enjoy :)', 'woocommerce' ) . '

-
'; + ?> +
+
+

Congratulations! – WooCommerce has been installed and setup. Enjoy :)', 'woocommerce' ); ?>

+

+

+
+
+