Remove welcome to woocommerce for store users note (#35342)

* Remove welcome to woocommerce store note

* Add changelog entry
This commit is contained in:
Joshua T Flowers 2022-11-18 09:51:35 -08:00 committed by GitHub
parent b2f66e3cf4
commit 6f7cc707c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 5 additions and 65 deletions

View File

@ -0,0 +1,4 @@
Significance: minor
Type: update
Remove welcome to woocommerce store note

View File

@ -839,6 +839,7 @@ class WC_Install {
'wc-admin-insight-first-sale',
'wc-admin-marketing-intro',
'wc-admin-draw-attention',
'wc-admin-welcome-to-woocommerce-for-store-users',
'wc-admin-need-some-inspiration',
'wc-admin-choose-niche',
'wc-admin-start-dropshipping-business',

View File

@ -39,7 +39,6 @@ use \Automattic\WooCommerce\Internal\Admin\Notes\SellingOnlineCourses;
use \Automattic\WooCommerce\Internal\Admin\Notes\TestCheckout;
use \Automattic\WooCommerce\Internal\Admin\Notes\TrackingOptIn;
use \Automattic\WooCommerce\Internal\Admin\Notes\UnsecuredReportFiles;
use \Automattic\WooCommerce\Internal\Admin\Notes\WelcomeToWooCommerceForStoreUsers;
use \Automattic\WooCommerce\Internal\Admin\Notes\WooCommercePayments;
use \Automattic\WooCommerce\Internal\Admin\Notes\WooCommerceSubscriptions;
use \Automattic\WooCommerce\Internal\Admin\Notes\WooSubscriptionsNotes;
@ -108,7 +107,6 @@ class Events {
OrderMilestones::class,
SellingOnlineCourses::class,
UnsecuredReportFiles::class,
WelcomeToWooCommerceForStoreUsers::class,
WooSubscriptionsNotes::class,
);

View File

@ -17,7 +17,6 @@ use \Automattic\WooCommerce\Internal\Admin\Notes\InstallJPAndWCSPlugins;
use \Automattic\WooCommerce\Internal\Admin\Notes\TestCheckout;
use \Automattic\WooCommerce\Internal\Admin\Notes\SellingOnlineCourses;
use \Automattic\WooCommerce\Internal\Admin\Notes\MerchantEmailNotifications;
use \Automattic\WooCommerce\Internal\Admin\Notes\WelcomeToWooCommerceForStoreUsers;
use \Automattic\WooCommerce\Internal\Admin\Notes\MagentoMigration;
use Automattic\WooCommerce\Admin\Features\Features;
use Automattic\WooCommerce\Admin\PluginsHelper;
@ -180,7 +179,6 @@ class FeaturePlugin {
new InstallJPAndWCSPlugins();
new TestCheckout();
new SellingOnlineCourses();
new WelcomeToWooCommerceForStoreUsers();
new MagentoMigration();
// Initialize MerchantEmailNotifications.

View File

@ -1,61 +0,0 @@
<?php
/**
* WooCommerce Admin: Welcome to WooCommerce for store users.
*/
namespace Automattic\WooCommerce\Internal\Admin\Notes;
defined( 'ABSPATH' ) || exit;
use \Automattic\WooCommerce\Admin\Notes\Note;
use \Automattic\WooCommerce\Admin\Notes\NoteTraits;
/**
* Welcome to WooCommerce for store users.
*/
class WelcomeToWooCommerceForStoreUsers {
/**
* Note traits.
*/
use NoteTraits;
/**
* Name of the note for use in the database.
*/
const NOTE_NAME = 'wc-admin-welcome-to-woocommerce-for-store-users';
/**
* Attach hooks.
*/
public function __construct() {
add_action( 'init', array( $this, 'possibly_add_note' ) );
}
/**
* Get the note.
*
* @return Note|null
*/
public static function get_note() {
// Only add if coming from Calypso.
if ( ! isset( $_GET['from-calypso'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
return;
}
$note = new Note();
$note->set_title( __( 'Welcome to your new store management experience', 'woocommerce' ) );
$note->set_content( __( "We've designed your navigation and home screen to help you focus on the things that matter most in managing your online store.", 'woocommerce' ) );
$note->set_type( Note::E_WC_ADMIN_NOTE_INFORMATIONAL );
$note->set_name( self::NOTE_NAME );
$note->set_source( 'woocommerce-admin' );
$note->add_action(
'learn-more',
__( 'Learn more', 'woocommerce' ),
'https://wordpress.com/support/new-woocommerce-experience-on-wordpress-dot-com/"',
Note::E_WC_ADMIN_NOTE_ACTIONED,
true
);
return $note;
}
}