Automattic\WooCommerce\Internal\OrderWithdrawal
OrderWithdrawalFeatureHighlightNotification::get_enabled_note
Get the inbox note shown after the feature is enabled.
Method of the class: OrderWithdrawalFeatureHighlightNotification{}
No Hooks.
Returns
null. Nothing (null).
Usage
// private - for code of main (parent) class only $result = $this->get_enabled_note(): Note;
OrderWithdrawalFeatureHighlightNotification::get_enabled_note() OrderWithdrawalFeatureHighlightNotification::get enabled note code WC 11.3.0
private function get_enabled_note(): Note {
$note = new Note();
$note->set_title( __( 'The order withdrawal feature is enabled', 'woocommerce' ) );
$note->set_content(
__( 'Your order withdrawal page is ready. Share its URL wherever customers need access to the withdrawal form, such as your store\'s terms and conditions.', 'woocommerce' )
);
$note->set_content_data( (object) array() );
$note->set_type( Note::E_WC_ADMIN_NOTE_INFORMATIONAL );
$note->set_name( self::ENABLED_NOTE_NAME );
$note->set_source( 'woocommerce-admin' );
$note->add_action(
'view-page',
__( 'View page', 'woocommerce' ),
$this->endpoint->get_url(),
Note::E_WC_ADMIN_NOTE_ACTIONED,
true
);
$note->add_action(
'learn-more',
__( 'Learn more', 'woocommerce' ),
self::DOCUMENTATION_URL,
Note::E_WC_ADMIN_NOTE_UNACTIONED
);
return $note;
}