Automattic\WooCommerce\Internal\Admin

OrderMilestoneEasterEgg::clear_milestone_cachepublicWC 1.0

Clears cached milestone order IDs until all milestones are complete.

Once the 1st, 100th, and 1000th qualifying order IDs have been found, later orders cannot create additional milestone overlays, so keep the cache stable and avoid recomputing it after routine order changes.

Method of the class: OrderMilestoneEasterEgg{}

No Hooks.

Returns

null. Nothing (null).

Usage

$OrderMilestoneEasterEgg = new OrderMilestoneEasterEgg();
$OrderMilestoneEasterEgg->clear_milestone_cache(): void;

OrderMilestoneEasterEgg::clear_milestone_cache() code WC 10.9.1

public function clear_milestone_cache(): void {
	if ( wc_string_to_bool( get_option( self::MILESTONES_COMPLETE_OPTION, 'no' ) ) ) {
		return;
	}

	delete_option( self::MILESTONE_CACHE_OPTION );
}