Automattic\WooCommerce\Internal\Admin\Notes

OrderMilestones::possibly_add_note()publicWC 1.0

Add milestone notes for other significant thresholds.

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

Хуков нет.

Возвращает

null. Ничего.

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

$OrderMilestones = new OrderMilestones();
$OrderMilestones->possibly_add_note();

Код OrderMilestones::possibly_add_note() WC 6.9.1

public function possibly_add_note() {
	if ( ! self::can_be_added() ) {
		return;
	}
	$current_milestone = $this->get_current_milestone();
	$this->set_last_milestone( $current_milestone );

	// We only want one milestone note at any time.
	Notes::delete_notes_with_name( self::NOTE_NAME );
	$note = $this->get_note_by_milestone( $current_milestone );
	$note->save();
}