Automattic\WooCommerce\Internal\Admin\Settings

Payments::clear_cache │ public │ WC 11.1.0

Clear cached payment provider data.

Call after changing provider ordering, suggestions, incentives, gateway registration, settings, or account state during a request. Also useful for testing purposes.

Method of the class: Payments{}

No Hooks.

Returns

void. Nothing (null).

Usage

$Payments = new Payments();
$Payments->clear_cache(): void;

Changelog

Since 11.1.0 Introduced.

Payments::clear_cache() code WC 11.1.2

public function clear_cache(): void {
	wp_cache_delete( self::PROVIDERS_REQUEST_CACHE_KEY, self::PROVIDERS_REQUEST_CACHE_GROUP );
	$this->providers->clear_cache();
}