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

Automattic\WooCommerce\Admin\Notes

WC_Admin_Notes_Order_Milestones::other_milestones() public WC 1.0

Add milestone notes for other significant thresholds.

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

Хуков нет.

Возвращает

Null. Ничего.

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

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

Код WC_Admin_Notes_Order_Milestones::other_milestones() WC 4.7.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.
	WC_Admin_Notes::delete_notes_with_name( self::NOTE_NAME );

	// Add the milestone note.
	$note = new WC_Admin_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( WC_Admin_Note::E_WC_ADMIN_NOTE_INFORMATIONAL );
	$note->set_name( self::NOTE_NAME );
	$note->set_source( 'woocommerce-admin' );
	$note->save();
}