Automattic\WooCommerce\Internal\Caches

ProductVersionStringInvalidator::invalidate_products_listprivateWC 1.0

Invalidate the product list version string.

This should be called when products are created, deleted, or change status, as these operations affect collection/list endpoints.

Method of the class: ProductVersionStringInvalidator{}

No Hooks.

Returns

null. Nothing (null).

Usage

// private - for code of main (parent) class only
$result = $this->invalidate_products_list(): void;

ProductVersionStringInvalidator::invalidate_products_list() code WC 10.8.1

private function invalidate_products_list(): void {
	wc_get_container()->get( VersionStringGenerator::class )->delete_version( 'list_products' );
}