WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

Automattic\WooCommerce\Admin\Notes

GettingStartedInEcommerceWebinar::get_note() public WC 1.0

Get the note.

{} Это метод класса: GettingStartedInEcommerceWebinar{}

Хуков нет.

Возвращает

Note.

Использование

$result = GettingStartedInEcommerceWebinar::get_note();

Код GettingStartedInEcommerceWebinar::get_note() WC 5.7.1

public static function get_note() {

	if ( ! self::onboarding_profile_started() ) {
		return;
	}

	if ( self::store_setup_for_client() ) {
		return;
	}

	if ( ! self::revenue_is_within( 0, 2500 ) ) {
		return;
	}

	// Don't show if there are products.
	$query    = new \WC_Product_Query(
		array(
			'limit'    => 1,
			'paginate' => true,
			'return'   => 'ids',
			'status'   => array( 'publish' ),
		)
	);
	$products = $query->get_products();
	$count    = $products->total;

	if ( 0 !== $count ) {
		return;
	}

	$note = new Note();
	$note->set_title( __( 'Getting Started in eCommerce - webinar', 'woocommerce' ) );
	$note->set_content( __( 'We want to make eCommerce and this process of getting started as easy as possible for you. Watch this webinar to get tips on how to have our store up and running in a breeze.', 'woocommerce' ) );
	$note->set_type( Note::E_WC_ADMIN_NOTE_INFORMATIONAL );
	$note->set_name( self::NOTE_NAME );
	$note->set_content_data( (object) array() );
	$note->set_source( 'woocommerce-admin' );
	$note->add_action(
		'getting-started-webinar',
		__( 'Watch the webinar', 'woocommerce' ),
		'https://youtu.be/V_2XtCOyZ7o'
	);

	return $note;
}