Automattic\WooCommerce\Internal\Caches

OrdersVersionStringInvalidator::invalidate_order_refunds_list │ private │ WC 1.0

Invalidate the refunds list version string for a specific order.

This should be called when refunds are created or deleted for an order, as these operations affect the /orders/{id}/refunds collection endpoint.

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

Хуков нет.

Возвращает

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

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

// private - только в коде основоного (родительского) класса
$result = $this->invalidate_order_refunds_list( $order_id ): void;
$order_id(int) (обязательный)
The parent order ID.

Код OrdersVersionStringInvalidator::invalidate_order_refunds_list() WC 11.2.2

private function invalidate_order_refunds_list( int $order_id ): void {
	if ( $order_id > 0 ) {
		wc_get_container()->get( VersionStringGenerator::class )->delete_version( "list_order_refunds_{$order_id}" );
	}
}