Automattic\WooCommerce\Internal\Caches
CouponCodeLookupInvalidator::invalidate_all
Invalidate every code to coupon id lookup entry at once.
Rotates the 'coupons' group prefix, which strands all previously cached lookup keys regardless of the code representation they were primed under, and the meta cache of every WC_Coupon along with them. Meant for bulk changes such as migrations that rewrite many codes; single coupon changes use invalidate().
Method of the class: CouponCodeLookupInvalidator{}
No Hooks.
Returns
void. Nothing (null).
Usage
$CouponCodeLookupInvalidator = new CouponCodeLookupInvalidator(); $CouponCodeLookupInvalidator->invalidate_all(): void;
Changelog
| Since 11.2.0 | Introduced. |
CouponCodeLookupInvalidator::invalidate_all() CouponCodeLookupInvalidator::invalidate all code WC 11.3.0
public function invalidate_all(): void {
\WC_Cache_Helper::invalidate_cache_group( self::CACHE_GROUP );
}