WC_Report_Sales_By_Category::get_export_button()
Output an export link.
Method of the class: WC_Report_Sales_By_Category{}
No Hooks.
Return
null
. Nothing (null).
Usage
$WC_Report_Sales_By_Category = new WC_Report_Sales_By_Category(); $WC_Report_Sales_By_Category->get_export_button();
WC_Report_Sales_By_Category::get_export_button() WC Report Sales By Category::get export button code WC 9.3.1
<?php public function get_export_button() { $current_range = ! empty( $_GET['range'] ) ? sanitize_text_field( wp_unslash( $_GET['range'] ) ) : '7day'; ?> <a href="#" download="report-<?php echo esc_attr( $current_range ); ?>-<?php echo esc_attr( date_i18n( 'Y-m-d', current_time( 'timestamp' ) ) ); ?>.csv" class="export_csv" data-export="chart" data-xaxes="<?php esc_attr_e( 'Date', 'woocommerce' ); ?>" data-groupby="<?php echo esc_attr( $this->chart_groupby ); ?>" > <?php esc_html_e( 'Export CSV', 'woocommerce' ); ?> </a> <?php }