Automattic\WooCommerce\Internal\Caches
OrdersVersionStringInvalidator::invalidate_orders_list
Invalidate the orders list version string.
This should be called when orders are created, deleted, change status, or change customer, as these operations affect collection/list endpoints.
Method of the class: OrdersVersionStringInvalidator{}
No Hooks.
Returns
null. Nothing (null).
Usage
// private - for code of main (parent) class only $result = $this->invalidate_orders_list(): void;
OrdersVersionStringInvalidator::invalidate_orders_list() OrdersVersionStringInvalidator::invalidate orders list code WC 10.8.1
private function invalidate_orders_list(): void {
wc_get_container()->get( VersionStringGenerator::class )->delete_version( 'list_orders' );
}