Automattic\WooCommerce\Internal\Admin\Notes

WooCommercePayments::get_note()public staticWC 1.0

Add a note about WooCommerce Payments.

Метод класса: WooCommercePayments{}

Хуков нет.

Возвращает

Note.

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

$result = WooCommercePayments::get_note();

Код WooCommercePayments::get_note() WC 8.7.0

public static function get_note() {
	$note = new Note();
	$note->set_title( __( 'Try the new way to get paid', 'woocommerce' ) );
	$note->set_content(
		__( 'Securely accept credit and debit cards on your site. Manage transactions without leaving your WordPress dashboard. Only with <strong>WooPayments</strong>.', 'woocommerce' ) .
		'<br><br>' .
		sprintf(
			/* translators: 1: opening link tag, 2: closing tag */
			__( 'By clicking "Get started", you agree to our %1$sTerms of Service%2$s', 'woocommerce' ),
			'<a href="https://wordpress.com/tos/" target="_blank">',
			'</a>'
		)
	);
	$note->set_content_data( (object) array() );
	$note->set_type( Note::E_WC_ADMIN_NOTE_MARKETING );
	$note->set_name( self::NOTE_NAME );
	$note->set_source( 'woocommerce-admin' );
	$note->add_action( 'learn-more', __( 'Learn more', 'woocommerce' ), 'https://woo.com/payments/?utm_medium=product', Note::E_WC_ADMIN_NOTE_UNACTIONED );
	$note->add_action( 'get-started', __( 'Get started', 'woocommerce' ), wc_admin_url( '&action=setup-woocommerce-payments' ), Note::E_WC_ADMIN_NOTE_ACTIONED, true );
	$note->add_nonce_to_action( 'get-started', 'setup-woocommerce-payments', '' );

	// Create the note as "actioned" if the plugin is already installed.
	if ( self::is_installed() ) {
		$note->set_status( Note::E_WC_ADMIN_NOTE_ACTIONED );
	}
	return $note;
}