WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

WC_Admin_Notices::wp_php_min_requirements_notice() public WC 3.6.5

Notice about WordPress and PHP minimum requirements.

Это метод класса: WC_Admin_Notices{}

Хуки из метода
Возвращает

null.

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

$result = WC_Admin_Notices::wp_php_min_requirements_notice();

Список изменений

С версии 3.6.5 Введена.

Код WC_Admin_Notices::wp_php_min_requirements_notice() WC 4.5.2

woocommerce/includes/admin/class-wc-admin-notices.php
<?php
public static function wp_php_min_requirements_notice() {
	if ( apply_filters( 'woocommerce_hide_php_wp_nag', get_user_meta( get_current_user_id(), 'dismissed_' . WC_PHP_MIN_REQUIREMENTS_NOTICE . '_notice', true ) ) ) {
		self::remove_notice( WC_PHP_MIN_REQUIREMENTS_NOTICE );
		return;
	}

	$old_php = version_compare( phpversion(), WC_NOTICE_MIN_PHP_VERSION, '<' );
	$old_wp  = version_compare( get_bloginfo( 'version' ), WC_NOTICE_MIN_WP_VERSION, '<' );

	// Both PHP and WordPress up to date version => no notice.
	if ( ! $old_php && ! $old_wp ) {
		return;
	}

	if ( $old_php && $old_wp ) {
		$msg = sprintf(
			/* translators: 1: Minimum PHP version 2: Minimum WordPress version */
			__( 'Update required: WooCommerce will soon require PHP version %1$s and WordPress version %2$s or newer.', 'woocommerce' ),
			WC_NOTICE_MIN_PHP_VERSION,
			WC_NOTICE_MIN_WP_VERSION
		);
	} elseif ( $old_php ) {
		$msg = sprintf(
			/* translators: %s: Minimum PHP version */
			__( 'Update required: WooCommerce will soon require PHP version %s or newer.', 'woocommerce' ),
			WC_NOTICE_MIN_PHP_VERSION
		);
	} elseif ( $old_wp ) {
		$msg = sprintf(
			/* translators: %s: Minimum WordPress version */
			__( 'Update required: WooCommerce will soon require WordPress version %s or newer.', 'woocommerce' ),
			WC_NOTICE_MIN_WP_VERSION
		);
	}

	include dirname( __FILE__ ) . '/views/html-notice-wp-php-minimum-requirements.php';
}