Automattic\WooCommerce\Internal\Caches

CouponCodeLookupInvalidator::invalidate_all │ public │ WC 11.2.0

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().

Метод класса: CouponCodeLookupInvalidator{}

Хуков нет.

Возвращает

void. Ничего (null).

Использование

$CouponCodeLookupInvalidator = new CouponCodeLookupInvalidator();
$CouponCodeLookupInvalidator->invalidate_all(): void;

Список изменений

С версии 11.2.0 Введена.

Код CouponCodeLookupInvalidator::invalidate_all() WC 11.3.0

public function invalidate_all(): void {
	\WC_Cache_Helper::invalidate_cache_group( self::CACHE_GROUP );
}