Automattic\WooCommerce\Internal\Admin\Notes

OrderMilestones::backfill_last_milestone()publicWC 1.0

Backfill the store's current milestone.

Used to avoid celebrating milestones that were reached before plugin activation.

Method of the class: OrderMilestones{}

No Hooks.

Return

null. Nothing (null).

Usage

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

OrderMilestones::backfill_last_milestone() code WC 8.7.0

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

	$this->set_last_milestone( $this->get_current_milestone() );
}