Automattic\WooCommerce\Internal\Admin
OrderMilestoneEasterEgg::update_milestones_complete_option
Updates the complete option when all milestone IDs have been found.
Метод класса: OrderMilestoneEasterEgg{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
// private - только в коде основоного (родительского) класса $result = $this->update_milestones_complete_option( $milestone_order_ids ): void;
- $milestone_order_ids(array<string, int>) (обязательный)
- Milestone order IDs keyed by milestone name.
Код OrderMilestoneEasterEgg::update_milestones_complete_option() OrderMilestoneEasterEgg::update milestones complete option WC 11.2.2
private function update_milestones_complete_option( array $milestone_order_ids ): void {
if ( count( $milestone_order_ids ) === count( self::MILESTONE_POSITIONS ) ) {
update_option( self::MILESTONES_COMPLETE_OPTION, 'yes', false );
return;
}
delete_option( self::MILESTONES_COMPLETE_OPTION );
}