Merge pull request #11547 from woothemes/fix/11543-undefined-custom-reports

[2.6] Display proper screen render text for custom range reports
This commit is contained in:
Claudio Sanches 2016-07-27 16:47:01 -03:00 committed by GitHub
commit 83d25ed035
1 changed files with 5 additions and 1 deletions

View File

@ -12,7 +12,11 @@ if ( ! defined( 'ABSPATH' ) ) {
<div id="poststuff" class="woocommerce-reports-wide"> <div id="poststuff" class="woocommerce-reports-wide">
<div class="postbox"> <div class="postbox">
<?php if ( 'custom' === $current_range && isset( $_GET['start_date'], $_GET['end_date'] ) ) : ?>
<h3 class="screen-reader-text"><?php echo esc_html( sprintf( _x( 'From %s to %s', 'start date and end date', 'woocommerce' ), wc_clean( $_GET['start_date'] ), wc_clean( $_GET['end_date'] ) ) ); ?></h3>
<?php else : ?>
<h3 class="screen-reader-text"><?php echo esc_html( $ranges[ $current_range ] ); ?></h3> <h3 class="screen-reader-text"><?php echo esc_html( $ranges[ $current_range ] ); ?></h3>
<?php endif; ?>
<div class="stats_range"> <div class="stats_range">
<?php $this->get_export_button(); ?> <?php $this->get_export_button(); ?>