2019-11-13 03:25:12 +00:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* WooCommerce Admin Onboarding Email Marketing Note Provider.
|
|
|
|
*
|
|
|
|
* Adds a note to sign up to email marketing after completing the profiler.
|
|
|
|
*/
|
|
|
|
|
|
|
|
namespace Automattic\WooCommerce\Admin\Notes;
|
|
|
|
|
|
|
|
defined( 'ABSPATH' ) || exit;
|
|
|
|
|
|
|
|
/**
|
2020-09-28 04:35:10 +00:00
|
|
|
* Onboarding_Email_Marketing
|
2019-11-13 03:25:12 +00:00
|
|
|
*/
|
2020-10-28 17:12:14 +00:00
|
|
|
class OnboardingEmailMarketing {
|
2020-05-22 13:48:40 +00:00
|
|
|
/**
|
|
|
|
* Note traits.
|
|
|
|
*/
|
|
|
|
use NoteTraits;
|
|
|
|
|
2019-11-13 03:25:12 +00:00
|
|
|
/**
|
|
|
|
* Name of the note for use in the database.
|
|
|
|
*/
|
|
|
|
const NOTE_NAME = 'wc-admin-onboarding-email-marketing';
|
|
|
|
|
|
|
|
/**
|
2020-05-22 13:48:40 +00:00
|
|
|
* Get the note.
|
2020-09-28 04:35:10 +00:00
|
|
|
*
|
|
|
|
* @return Note
|
2019-11-13 03:25:12 +00:00
|
|
|
*/
|
2020-05-22 13:48:40 +00:00
|
|
|
public static function get_note() {
|
2020-04-22 21:40:19 +00:00
|
|
|
$content = __( 'We\'re here for you - get tips, product updates and inspiration straight to your email box', 'woocommerce-admin' );
|
2019-11-13 03:25:12 +00:00
|
|
|
|
2020-09-28 04:35:10 +00:00
|
|
|
$note = new Note();
|
2021-01-07 21:24:14 +00:00
|
|
|
$note->set_title( __( 'Sign up for tips, product updates, and inspiration', 'woocommerce-admin' ) );
|
2019-11-13 03:25:12 +00:00
|
|
|
$note->set_content( $content );
|
|
|
|
$note->set_content_data( (object) array() );
|
2020-09-28 04:35:10 +00:00
|
|
|
$note->set_type( Note::E_WC_ADMIN_NOTE_INFORMATIONAL );
|
2019-11-13 03:25:12 +00:00
|
|
|
$note->set_name( self::NOTE_NAME );
|
|
|
|
$note->set_source( 'woocommerce-admin' );
|
|
|
|
$note->add_action( 'yes-please', __( 'Yes please!', 'woocommerce-admin' ), 'https://woocommerce.us8.list-manage.com/subscribe/post?u=2c1434dc56f9506bf3c3ecd21&id=13860df971&SIGNUPPAGE=plugin' );
|
2020-05-22 13:48:40 +00:00
|
|
|
return $note;
|
2019-11-13 03:25:12 +00:00
|
|
|
}
|
|
|
|
}
|