WC_Report_Coupon_Usage::output_report()
Output the report.
Description Description
Source Source
File: includes/admin/reports/class-wc-report-coupon-usage.php
130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 | public function output_report() { $ranges = array ( 'year' => __( 'Year' , 'woocommerce' ), 'last_month' => __( 'Last month' , 'woocommerce' ), 'month' => __( 'This month' , 'woocommerce' ), '7day' => __( 'Last 7 days' , 'woocommerce' ), ); $this ->chart_colours = array ( 'discount_amount' => '#3498db' , 'coupon_count' => '#d4d9dc' , ); $current_range = ! empty ( $_GET [ 'range' ] ) ? sanitize_text_field( wp_unslash( $_GET [ 'range' ] ) ) : '7day' ; if ( ! in_array( $current_range , array ( 'custom' , 'year' , 'last_month' , 'month' , '7day' ) ) ) { $current_range = '7day' ; } $this ->check_current_range_nonce( $current_range ); $this ->calculate_current_range( $current_range ); include WC()->plugin_path() . '/includes/admin/views/html-report-by-date.php' ; } |