Automattic\WooCommerce\Internal\Features
FeaturesController::maybe_invalidate_cached_plugin_data()
If the 'incompatible with features' plugin list is being rendered, invalidate existing cached plugin data.
This heads off a problem in which WordPress's get_plugins() may be called much earlier in the request (by third party code, for example), the results of which are cached, and before WooCommerce can modify the list to inject useful information of its own.
Метод класса: FeaturesController{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
// private - только в коде основоного (родительского) класса $result = $this->maybe_invalidate_cached_plugin_data(): void;
Заметки
Код FeaturesController::maybe_invalidate_cached_plugin_data() FeaturesController::maybe invalidate cached plugin data WC 9.3.3
private function maybe_invalidate_cached_plugin_data(): void { // phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized if ( ( $_GET['plugin_status'] ?? '' ) === 'incompatible_with_feature' ) { wp_cache_delete( 'plugins', 'plugins' ); } }