Edit File by line
/home/zeestwma/richards.../wp-conte.../plugins/woocomme.../includes/admin/views
File: html-report-by-date.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* Admin View: Report by Date (with date filters)
[2] Fix | Delete
*
[3] Fix | Delete
* @package WooCommerce\Admin\Reporting
[4] Fix | Delete
*/
[5] Fix | Delete
[6] Fix | Delete
if ( ! defined( 'ABSPATH' ) ) {
[7] Fix | Delete
exit; // Exit if accessed directly.
[8] Fix | Delete
}
[9] Fix | Delete
?>
[10] Fix | Delete
<div id="poststuff" class="woocommerce-reports-wide">
[11] Fix | Delete
<div class="postbox">
[12] Fix | Delete
[13] Fix | Delete
<?php if ( 'custom' === $current_range && isset( $_GET['start_date'], $_GET['end_date'] ) ) : ?>
[14] Fix | Delete
<h3 class="screen-reader-text">
[15] Fix | Delete
<?php
[16] Fix | Delete
/* translators: 1: start date 2: end date */
[17] Fix | Delete
printf(
[18] Fix | Delete
esc_html__( 'From %1$s to %2$s', 'woocommerce' ),
[19] Fix | Delete
esc_html( wc_clean( wp_unslash( $_GET['start_date'] ) ) ),
[20] Fix | Delete
esc_html( wc_clean( wp_unslash( $_GET['end_date'] ) ) )
[21] Fix | Delete
);
[22] Fix | Delete
?>
[23] Fix | Delete
</h3>
[24] Fix | Delete
<?php else : ?>
[25] Fix | Delete
<h3 class="screen-reader-text"><?php echo esc_html( $ranges[ $current_range ] ); ?></h3>
[26] Fix | Delete
<?php endif; ?>
[27] Fix | Delete
[28] Fix | Delete
<div class="stats_range">
[29] Fix | Delete
<?php $this->get_export_button(); ?>
[30] Fix | Delete
<ul>
[31] Fix | Delete
<?php
[32] Fix | Delete
foreach ( $ranges as $range => $name ) {
[33] Fix | Delete
echo '<li class="' . ( $current_range == $range ? 'active' : '' ) . '"><a href="' . esc_url( remove_query_arg( array( 'start_date', 'end_date' ), add_query_arg( 'range', $range ) ) ) . '">' . esc_html( $name ) . '</a></li>';
[34] Fix | Delete
}
[35] Fix | Delete
?>
[36] Fix | Delete
<li class="custom <?php echo ( 'custom' === $current_range ) ? 'active' : ''; ?>">
[37] Fix | Delete
<?php esc_html_e( 'Custom:', 'woocommerce' ); ?>
[38] Fix | Delete
<form method="GET">
[39] Fix | Delete
<div>
[40] Fix | Delete
<?php
[41] Fix | Delete
// Maintain query string.
[42] Fix | Delete
foreach ( $_GET as $key => $value ) {
[43] Fix | Delete
if ( is_array( $value ) ) {
[44] Fix | Delete
foreach ( $value as $v ) {
[45] Fix | Delete
echo '<input type="hidden" name="' . esc_attr( sanitize_text_field( $key ) ) . '[]" value="' . esc_attr( sanitize_text_field( $v ) ) . '" />';
[46] Fix | Delete
}
[47] Fix | Delete
} else {
[48] Fix | Delete
echo '<input type="hidden" name="' . esc_attr( sanitize_text_field( $key ) ) . '" value="' . esc_attr( sanitize_text_field( $value ) ) . '" />';
[49] Fix | Delete
}
[50] Fix | Delete
}
[51] Fix | Delete
?>
[52] Fix | Delete
<input type="hidden" name="range" value="custom" />
[53] Fix | Delete
<input type="text" size="11" placeholder="yyyy-mm-dd" value="<?php echo ( ! empty( $_GET['start_date'] ) ) ? esc_attr( wp_unslash( $_GET['start_date'] ) ) : ''; ?>" name="start_date" class="range_datepicker from" autocomplete="off" /><?php //@codingStandardsIgnoreLine ?>
[54] Fix | Delete
<span>&ndash;</span>
[55] Fix | Delete
<input type="text" size="11" placeholder="yyyy-mm-dd" value="<?php echo ( ! empty( $_GET['end_date'] ) ) ? esc_attr( wp_unslash( $_GET['end_date'] ) ) : ''; ?>" name="end_date" class="range_datepicker to" autocomplete="off" /><?php //@codingStandardsIgnoreLine ?>
[56] Fix | Delete
<button type="submit" class="button" value="<?php esc_attr_e( 'Go', 'woocommerce' ); ?>"><?php esc_html_e( 'Go', 'woocommerce' ); ?></button>
[57] Fix | Delete
<?php wp_nonce_field( 'custom_range', 'wc_reports_nonce', false ); ?>
[58] Fix | Delete
</div>
[59] Fix | Delete
</form>
[60] Fix | Delete
</li>
[61] Fix | Delete
</ul>
[62] Fix | Delete
</div>
[63] Fix | Delete
<?php if ( empty( $hide_sidebar ) ) : ?>
[64] Fix | Delete
<div class="inside chart-with-sidebar">
[65] Fix | Delete
<div class="chart-sidebar">
[66] Fix | Delete
<?php if ( $legends = $this->get_chart_legend() ) : ?>
[67] Fix | Delete
<ul class="chart-legend">
[68] Fix | Delete
<?php foreach ( $legends as $legend ) : ?>
[69] Fix | Delete
<?php // @codingStandardsIgnoreStart ?>
[70] Fix | Delete
<li style="border-color: <?php echo $legend['color']; ?>" <?php if ( isset( $legend['highlight_series'] ) ) echo 'class="highlight_series ' . ( isset( $legend['placeholder'] ) ? 'tips' : '' ) . '" data-series="' . esc_attr( $legend['highlight_series'] ) . '"'; ?> data-tip="<?php echo isset( $legend['placeholder'] ) ? $legend['placeholder'] : ''; ?>">
[71] Fix | Delete
<?php echo $legend['title']; ?>
[72] Fix | Delete
</li>
[73] Fix | Delete
<?php // @codingStandardsIgnoreEnd ?>
[74] Fix | Delete
<?php endforeach; ?>
[75] Fix | Delete
</ul>
[76] Fix | Delete
<?php endif; ?>
[77] Fix | Delete
<ul class="chart-widgets">
[78] Fix | Delete
<?php foreach ( $this->get_chart_widgets() as $widget ) : ?>
[79] Fix | Delete
<li class="chart-widget">
[80] Fix | Delete
<?php if ( $widget['title'] ) : ?>
[81] Fix | Delete
<h4><?php echo esc_html( $widget['title'] ); ?></h4>
[82] Fix | Delete
<?php endif; ?>
[83] Fix | Delete
<?php call_user_func( $widget['callback'] ); ?>
[84] Fix | Delete
</li>
[85] Fix | Delete
<?php endforeach; ?>
[86] Fix | Delete
</ul>
[87] Fix | Delete
</div>
[88] Fix | Delete
<div class="main">
[89] Fix | Delete
<?php $this->get_main_chart(); ?>
[90] Fix | Delete
</div>
[91] Fix | Delete
</div>
[92] Fix | Delete
<?php else : ?>
[93] Fix | Delete
<div class="inside">
[94] Fix | Delete
<?php $this->get_main_chart(); ?>
[95] Fix | Delete
</div>
[96] Fix | Delete
<?php endif; ?>
[97] Fix | Delete
</div>
[98] Fix | Delete
</div>
[99] Fix | Delete
[100] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function