diff --git a/includes/admin/views/html-admin-page-status-report.php b/includes/admin/views/html-admin-page-status-report.php index 17a3f8b71dd..19307285a05 100644 --- a/includes/admin/views/html-admin-page-status-report.php +++ b/includes/admin/views/html-admin-page-status-report.php @@ -66,6 +66,11 @@ if ( ! defined( 'ABSPATH' ) ) { ' . sprintf( __( '%s - We recommend setting memory to at least 64MB. See: Increasing memory allocated to PHP', 'woocommerce' ), size_format( $memory ), 'http://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP' ) . ''; } else { diff --git a/includes/class-wc-tracker.php b/includes/class-wc-tracker.php index 47096833544..3648fb6fb08 100644 --- a/includes/class-wc-tracker.php +++ b/includes/class-wc-tracker.php @@ -154,11 +154,17 @@ class WC_Tracker { $wp_data = array(); $memory = wc_let_to_num( WP_MEMORY_LIMIT ); + + if ( function_exists( 'memory_get_usage' ) ) { + $system_memory = wc_let_to_num( @ini_get( 'memory_limit' ) ); + $memory = max( $memory, $system_memory ); + } + $wp_data['memory_limit'] = size_format( $memory ); - $wp_data['debug_mode'] = ( defined('WP_DEBUG') && WP_DEBUG ) ? 'Yes' : 'No'; - $wp_data['locale'] = get_locale(); - $wp_data['version'] = get_bloginfo( 'version' ); - $wp_data['multisite'] = is_multisite() ? 'Yes' : 'No'; + $wp_data['debug_mode'] = ( defined('WP_DEBUG') && WP_DEBUG ) ? 'Yes' : 'No'; + $wp_data['locale'] = get_locale(); + $wp_data['version'] = get_bloginfo( 'version' ); + $wp_data['multisite'] = is_multisite() ? 'Yes' : 'No'; return $wp_data; }