From 1ee8dfde24bc171abe1e8100ee917f9eb8054917 Mon Sep 17 00:00:00 2001 From: Coen Jacobs Date: Tue, 14 May 2013 11:33:19 +0200 Subject: [PATCH] Replace deprecated wp_convert_bytes_to_hr() with size_format(). Closes #3154 --- admin/importers/tax-rates-importer.php | 4 ++-- admin/woocommerce-admin-status.php | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/admin/importers/tax-rates-importer.php b/admin/importers/tax-rates-importer.php index 508ca31cd0c..9ec5789dc2c 100644 --- a/admin/importers/tax-rates-importer.php +++ b/admin/importers/tax-rates-importer.php @@ -288,7 +288,7 @@ if ( class_exists( 'WP_Importer' ) ) { $action = 'admin.php?import=woocommerce_tax_rate_csv&step=1'; $bytes = apply_filters( 'import_upload_size_limit', wp_max_upload_size() ); - $size = wp_convert_bytes_to_hr( $bytes ); + $size = size_format( $bytes ); $upload_dir = wp_upload_dir(); if ( ! empty( $upload_dir['error'] ) ) : ?>

@@ -341,4 +341,4 @@ if ( class_exists( 'WP_Importer' ) ) { return 60; } } -} \ No newline at end of file +} diff --git a/admin/woocommerce-admin-status.php b/admin/woocommerce-admin-status.php index b036368417f..4fa6868ed57 100644 --- a/admin/woocommerce-admin-status.php +++ b/admin/woocommerce-admin-status.php @@ -111,9 +111,9 @@ function woocommerce_status_report() { $memory = woocommerce_let_to_num( WP_MEMORY_LIMIT ); if ( $memory < 67108864 ) { - echo '' . sprintf( __( '%s - We recommend setting memory to at least 64MB. See: Increasing memory allocated to PHP', 'woocommerce' ), wp_convert_bytes_to_hr( $memory ), 'http://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP' ) . ''; + echo '' . 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 { - echo '' . wp_convert_bytes_to_hr( $memory ) . ''; + echo '' . size_format $memory ) . ''; } ?> @@ -123,11 +123,11 @@ function woocommerce_status_report() { : - + : - + : @@ -710,4 +710,4 @@ function woocommerce_status_tools() {