Changed email marketing note and the old filter was removed (https://github.com/woocommerce/woocommerce-admin/pull/4167)
* Changed email marketing note and the old filter was removed The email marketing note was modified. Also, the old filter was removed. * This note is not using NoteTraits anymore. The NoteTraits reference was removed because the note is not using it anymore. Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
This commit is contained in:
parent
2f8ba63ec0
commit
7dc87c0492
|
@ -11,17 +11,10 @@ namespace Automattic\WooCommerce\Admin\Notes;
|
||||||
|
|
||||||
defined( 'ABSPATH' ) || exit;
|
defined( 'ABSPATH' ) || exit;
|
||||||
|
|
||||||
use Automattic\WooCommerce\Admin\Features\Onboarding;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* WC_Admin_Notes_Onboarding_Email_Marketing
|
* WC_Admin_Notes_Onboarding_Email_Marketing
|
||||||
*/
|
*/
|
||||||
class WC_Admin_Notes_Onboarding_Email_Marketing {
|
class WC_Admin_Notes_Onboarding_Email_Marketing {
|
||||||
/**
|
|
||||||
* Note traits.
|
|
||||||
*/
|
|
||||||
use NoteTraits;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Name of the note for use in the database.
|
* Name of the note for use in the database.
|
||||||
*/
|
*/
|
||||||
|
@ -31,14 +24,6 @@ class WC_Admin_Notes_Onboarding_Email_Marketing {
|
||||||
* Possibly add email marketing note.
|
* Possibly add email marketing note.
|
||||||
*/
|
*/
|
||||||
public static function possibly_add_onboarding_email_marketing_note() {
|
public static function possibly_add_onboarding_email_marketing_note() {
|
||||||
// We want to show the email marketing note after day 2 if the profiler is complete.
|
|
||||||
$onboarding_data = get_option( Onboarding::PROFILE_DATA_OPTION, array() );
|
|
||||||
$is_completed = isset( $onboarding_data['completed'] ) && true === $onboarding_data['completed'];
|
|
||||||
$two_days_in_seconds = 2 * DAY_IN_SECONDS;
|
|
||||||
if ( ! self::wc_admin_active_for( $two_days_in_seconds ) || ! $is_completed ) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
$data_store = \WC_Data_Store::load( 'admin-note' );
|
$data_store = \WC_Data_Store::load( 'admin-note' );
|
||||||
|
|
||||||
// We already have this note? Then exit, we're done.
|
// We already have this note? Then exit, we're done.
|
||||||
|
@ -47,7 +32,7 @@ class WC_Admin_Notes_Onboarding_Email_Marketing {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$content = __( 'We\'re here for you — get tips, product updates, and inspiration straight to your mailbox.', 'woocommerce-admin' );
|
$content = __( 'We\'re here for you - get tips, product updates and inspiration straight to your email box', 'woocommerce-admin' );
|
||||||
|
|
||||||
$note = new WC_Admin_Note();
|
$note = new WC_Admin_Note();
|
||||||
$note->set_title( __( 'Tips, product updates, and inspiration', 'woocommerce-admin' ) );
|
$note->set_title( __( 'Tips, product updates, and inspiration', 'woocommerce-admin' ) );
|
||||||
|
|
Loading…
Reference in New Issue