WC_Helper_Updater::expire_updates_cache
Forces a fresh update check while keeping the cached products, so they are still served if that check fails.
Метод класса: WC_Helper_Updater{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
$result = WC_Helper_Updater::expire_updates_cache(): void;
Список изменений
| С версии 11.3.0 | Введена. |
Код WC_Helper_Updater::expire_updates_cache() WC Helper Updater::expire updates cache WC 11.3.0
public static function expire_updates_cache(): void {
$data = get_transient( '_woocommerce_helper_updates' );
if ( is_array( $data ) && isset( $data['hash'] ) ) {
$data['expired'] = true;
set_transient( '_woocommerce_helper_updates', $data, WEEK_IN_SECONDS );
}
delete_transient( '_woocommerce_helper_updates_count' );
delete_site_transient( 'update_plugins' );
delete_site_transient( 'update_themes' );
}