Conversation
supportHi, I have been using this plugin for a little while now. I have modified it to fit my needs. I needed a column for District Sales Total with Shipping (no tax). The code was simple to understand and that was easily added. I will have to merge future updates. I noticed an error. It would only appear if sales tax is calculated on shipping. Around line 265 of report-admin.php, The code subtracts get_total_tax() AND get_shipping_tax(). Shipping tax is included in the total tax. I removed the erroneous shipping tax subtraction. Original ————— $cart_value = number_format( (float) $order->get_total() – $order->get_total_tax() – $order->get_shipping_total() – $order->get_shipping_tax(), wc_get_price_decimals(), ‘.’, ” ); Change ——————- $cart_value = number_format( (float) $order->get_total() – $order->get_total_tax() – $order->get_shipping_total(), wc_get_price_decimals(), ‘.’, ” ); Another issue I had was with memory. It may be how many orders are in the database, but I had to increase the WP_Memory_limit in wp_confing.php from 256M to 500M. Otherwise it would reach the memory limit and crash. define(‘WP_MEMORY_LIMIT’, ‘500M’);
No comments were stored for this source.