WC_Cache_Helper::notices()public staticWC 1.0

Notices function.

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

Хуков нет.

Возвращает

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

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

$result = WC_Cache_Helper::notices();

Код WC_Cache_Helper::notices() WC 8.7.0

<?php
public static function notices() {
	if ( ! function_exists( 'w3tc_pgcache_flush' ) || ! function_exists( 'w3_instance' ) ) {
		return;
	}

	$config   = w3_instance( 'W3_Config' );
	$enabled  = $config->get_integer( 'dbcache.enabled' );
	$settings = array_map( 'trim', $config->get_array( 'dbcache.reject.sql' ) );

	if ( $enabled && ! in_array( '_wc_session_', $settings, true ) ) {
		?>
		<div class="error">
			<p>
			<?php
			/* translators: 1: key 2: URL */
			echo wp_kses_post( sprintf( __( 'In order for <strong>database caching</strong> to work with WooCommerce you must add %1$s to the "Ignored Query Strings" option in <a href="%2$s">W3 Total Cache settings</a>.', 'woocommerce' ), '<code>_wc_session_</code>', esc_url( admin_url( 'admin.php?page=w3tc_dbcache' ) ) ) );
			?>
			</p>
		</div>
		<?php
	}
}