Automattic\WooCommerce\Internal\Admin\Notes

OrderMilestones::get_note_by_milestone()publicWC 1.0

Get the note by milestones.

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

Хуков нет.

Возвращает

Note.

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

$OrderMilestones = new OrderMilestones();
$OrderMilestones->get_note_by_milestone( $current_milestone );
$current_milestone(int) (обязательный)
Current milestone.

Код OrderMilestones::get_note_by_milestone() WC 6.9.4

public function get_note_by_milestone( $current_milestone ) {
	$note = new Note();
	$note->set_title( self::get_note_title_for_milestone( $current_milestone ) );
	$note->set_content( self::get_note_content_for_milestone( $current_milestone ) );
	$note_action = self::get_note_action_for_milestone( $current_milestone );
	$note->add_action( $note_action['name'], $note_action['label'], $note_action['query'] );
	$note->set_type( Note::E_WC_ADMIN_NOTE_INFORMATIONAL );
	$note->set_name( self::NOTE_NAME );
	$note->set_source( 'woocommerce-admin' );
	return $note;
}