From 6727fdba629657b0b11773f453a45ce973915f69 Mon Sep 17 00:00:00 2001 From: Peter Fabian Date: Tue, 2 Jul 2019 18:44:43 +0200 Subject: [PATCH] Updated constants' names to better reflect their usage. --- includes/admin/class-wc-admin-notices.php | 14 +++++++------- includes/class-woocommerce.php | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/includes/admin/class-wc-admin-notices.php b/includes/admin/class-wc-admin-notices.php index 6e5079713c5..84116f1dd21 100644 --- a/includes/admin/class-wc-admin-notices.php +++ b/includes/admin/class-wc-admin-notices.php @@ -379,7 +379,7 @@ class WC_Admin_Notices { * @since 3.6.5 */ public static function add_min_version_notice() { - if ( version_compare( phpversion(), WC_MIN_PHP_VERSION, '<' ) || version_compare( get_bloginfo( 'version' ), WC_MIN_WP_VERSION, '<' ) ) { + if ( version_compare( phpversion(), WC_NOTICE_MIN_PHP_VERSION, '<' ) || version_compare( get_bloginfo( 'version' ), WC_NOTICE_MIN_WP_VERSION, '<' ) ) { self::add_notice( 'wp_php_min_requirements' ); } } @@ -396,8 +396,8 @@ class WC_Admin_Notices { return; } - $old_php = version_compare( phpversion(), WC_MIN_PHP_VERSION, '<' ); - $old_wp = version_compare( get_bloginfo( 'version' ), WC_MIN_WP_VERSION, '<' ); + $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 ) { @@ -408,20 +408,20 @@ class WC_Admin_Notices { $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_MIN_PHP_VERSION, - WC_MIN_WP_VERSION + 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_MIN_PHP_VERSION + 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_MIN_WP_VERSION + WC_NOTICE_MIN_WP_VERSION ); } diff --git a/includes/class-woocommerce.php b/includes/class-woocommerce.php index 0208accb209..c7c5fb71d6f 100644 --- a/includes/class-woocommerce.php +++ b/includes/class-woocommerce.php @@ -228,8 +228,8 @@ final class WooCommerce { $this->define( 'WC_LOG_DIR', $upload_dir['basedir'] . '/wc-logs/' ); $this->define( 'WC_SESSION_CACHE_GROUP', 'wc_session_id' ); $this->define( 'WC_TEMPLATE_DEBUG_MODE', false ); - $this->define( 'WC_MIN_PHP_VERSION', '5.6.20' ); - $this->define( 'WC_MIN_WP_VERSION', '4.9' ); + $this->define( 'WC_NOTICE_MIN_PHP_VERSION', '5.6.20' ); + $this->define( 'WC_NOTICE_MIN_WP_VERSION', '4.9' ); } /**