Woocommerce point of sale (POS) report system updates and customization

Changes has to be made EVERY TIME When woocommerce plugin or Woocommerce point of sale plugin is updated !!!

In order to customize Woocommerce Point of Sale plugin those changes have to be made.
1. Folder Views must be added to: wp-content/plugins/woocommerce-point-of-sale/includes/reports
Files in this folder: sales-table.php(shows report results),pie-chart.php(chart is showing data in graph),main-chart.php(shows charts above data table),export-button.php(shows export data to csv button).
2. class-wc-pos-report-sales.php file has to be added to wp-content/plugins/woocommerce-point-of-sale/includes/reports/class-wc-pos-report-sales.php
This file is from lower version and is preparing sales report data.
3.Changes in class-wc-pos-admin.php file mast be made. File located : /wp-content/plugins/woocommerce-point-of-sale/includes/admin/class-wc-pos-admin.php
Sample of the file is attached class-wc-pos-admin
4.Make sure that class-wc-pos-abstract.php is present in wp-content/plugins/woocommerce-point-of-sale/includes/class-wc-pos-abstract.php
Sample file attached :class-wc-pos-abstract.php
5.In order to refresh sales data every time report is calling, some changes (flash old data storage) have to be made.
File class-wc-pos-abstract.php is places /wp-content/plugins/woocommerce/includes/admin/reports/class-wc-pos-abstract.php

on line code 326
add code below started from /*Included (line 332)

if ( $debug ) {
echo ‘

';
wc_print_r( $query );
echo '

‘;
}
/* Included for POS reports updates immediately */
$cached_results[ $query_hash ] = null;

Leave a Reply

Your email address will not be published.