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

Automattic\WooCommerce\Admin\Notes

OrderMilestones::other_milestones() public WC 1.0

Add milestone notes for other significant thresholds.

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

Хуков нет.

Возвращает

null. Ничего.

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

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

Код OrderMilestones::other_milestones() WC 5.4.1

<?php
public function other_milestones() {
	// If the milestone notes have been disabled via filter, bail.
	if ( ! $this->are_milestones_enabled() ) {
		return;
	}

	$last_milestone    = $this->get_last_milestone();
	$current_milestone = $this->get_current_milestone();

	if ( $current_milestone <= $last_milestone ) {
		return;
	}

	$this->set_last_milestone( $current_milestone );

	// We only want one milestone note at any time.
	Notes::delete_notes_with_name( self::NOTE_NAME );

	// Add the milestone note.
	$note = new Note();
	$note->set_title( $this->get_note_title_for_milestone( $current_milestone ) );
	$note->set_content( $this->get_note_content_for_milestone( $current_milestone ) );
	$note_action = $this->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' );
	$note->save();
}