Automattic\WooCommerce\Internal\Admin\Notes
OrderMilestones::can_be_added()
Checks if a note can and should be added.
Метод класса: OrderMilestones{}
Хуков нет.
Возвращает
true|false
.
Использование
$OrderMilestones = new OrderMilestones(); $OrderMilestones->can_be_added();
Код OrderMilestones::can_be_added() OrderMilestones::can be added WC 9.4.2
public function can_be_added() { // If the milestone notes have been disabled via filter, bail. if ( ! $this->are_milestones_enabled() ) { return false; } $last_milestone = $this->get_last_milestone(); $current_milestone = $this->get_current_milestone(); if ( $current_milestone <= $last_milestone ) { return false; } return true; }