Changeset 3336428
- Timestamp:
- 07/30/2025 08:57:24 AM (7 months ago)
- Location:
- sales-analytics-for-woocommerce
- Files:
-
- 34 added
- 3 edited
-
tags/2.2 (added)
-
tags/2.2/assets (added)
-
tags/2.2/assets/css (added)
-
tags/2.2/assets/css/style.css (added)
-
tags/2.2/assets/images (added)
-
tags/2.2/assets/images/ai-icon.png (added)
-
tags/2.2/assets/js (added)
-
tags/2.2/assets/js/chart.js (added)
-
tags/2.2/assets/js/revenue-analytics.js (added)
-
tags/2.2/assets/js/sales-analytics.js (added)
-
tags/2.2/assets/js/sales-by-method.js (added)
-
tags/2.2/assets/js/sales-by-product.js (added)
-
tags/2.2/assets/js/sales-by-user.js (added)
-
tags/2.2/csv-handler (added)
-
tags/2.2/csv-handler/csv-generate.php (added)
-
tags/2.2/fetch-query-functions (added)
-
tags/2.2/fetch-query-functions/revenue-analytics-query-hpos.php (added)
-
tags/2.2/fetch-query-functions/revenue-analytics-query.php (added)
-
tags/2.2/fetch-query-functions/sale-by-method-query-hpos.php (added)
-
tags/2.2/fetch-query-functions/sale-by-method-query.php (added)
-
tags/2.2/fetch-query-functions/sales-analytics-query.php (added)
-
tags/2.2/fetch-query-functions/sales-by-product-query-hpos.php (added)
-
tags/2.2/fetch-query-functions/sales-by-product-query.php (added)
-
tags/2.2/includes (added)
-
tags/2.2/includes/functions.php (added)
-
tags/2.2/includes/menu-reg.php (added)
-
tags/2.2/index.php (added)
-
tags/2.2/readme.txt (added)
-
tags/2.2/revenue-analytics.php (added)
-
tags/2.2/sales-analytics-for-woocommerce.php (added)
-
tags/2.2/sales-analytics.php (added)
-
tags/2.2/sales-by-method.php (added)
-
tags/2.2/sales-by-product.php (added)
-
tags/2.2/sales-by-user.php (added)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/sales-analytics-for-woocommerce.php (modified) (2 diffs)
-
trunk/sales-by-user.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
sales-analytics-for-woocommerce/trunk/readme.txt
r3335970 r3336428 6 6 Tested up to: 6.8 7 7 Requires PHP: 7.4 8 Stable tag: 2. 18 Stable tag: 2.2 9 9 License: GPLv2 or later 10 10 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 62 62 63 63 == Changelog == 64 = 2.2 = 65 * Fix currency symbol bug 66 67 = 2.1 = 68 * update Readme.txt 69 64 70 = 2.0 = 65 71 * Added new Customer Performance Analytics feature to track user-level metrics such as total orders, total amount spent, average purchase, min/max order value, and last purchase date. -
sales-analytics-for-woocommerce/trunk/sales-analytics-for-woocommerce.php
r3335970 r3336428 4 4 Plugin URI: https://plugins.techbeeps.com 5 5 Description: A plugin to generate custom analytics reports for WooCommerce stores, including sales data, product performance, and more. 6 Version: 2. 16 Version: 2.2 7 7 Author: Techbeeps services 8 8 Author URI: https://www.techbeeps.com … … 20 20 21 21 22 define('SALESAFW_SALES_ANALYTICS_TBS_VERSION', '2. 1');22 define('SALESAFW_SALES_ANALYTICS_TBS_VERSION', '2.2'); 23 23 define('SALESAFW_SALES_ANALYTICS_TBS_PATH', plugin_dir_path(__FILE__)); 24 24 define('SALESAFW_SALES_ANALYTICS_TBS_URL', plugin_dir_url(__FILE__)); -
sales-analytics-for-woocommerce/trunk/sales-by-user.php
r3335970 r3336428 31 31 $user_id = $order->get_user_id(); 32 32 $total = floatval($order->get_total()); 33 $date = $order->get_date_c ompleted();33 $date = $order->get_date_created(); 34 34 $currency = get_woocommerce_currency_symbol($order->get_currency()); 35 35 … … 51 51 ]; 52 52 } 53 53 54 $user_data[$user_id]['total_orders'] += 1; 54 55 $user_data[$user_id]['total_amount'] += $total; … … 86 87 return $b['total_amount'] <=> $a['total_amount']; 87 88 }); 89 88 90 foreach ($user_data as $data) { 89 91 $avg = $data['total_orders'] ? ($data['total_amount'] / $data['total_orders']) : 0; … … 92 94 echo '<td>' . esc_html($data['name']) . '</td>'; 93 95 echo '<td>' . esc_html($data['email']) . '</td>'; 94 echo '<td>' . esc_html($data['currency']) . ' ' . number_format($avg, 2) . '</td>';95 echo '<td>' . esc_html($data['currency']) . ' ' . number_format($data['min_purchase'], 2) . '</td>';96 echo '<td>' . esc_html($data['currency']) . ' ' . number_format($data['max_purchase'], 2) . '</td>';97 echo '<td>' . esc_html($data['last_purchase']->date('Y-m-d') ) . '</td>';96 echo '<td>' . wp_kses_post($data['currency']) . ' ' . number_format($avg, 2) . '</td>'; 97 echo '<td>' . wp_kses_post($data['currency']) . ' ' . number_format($data['min_purchase'], 2) . '</td>'; 98 echo '<td>' . wp_kses_post($data['currency']) . ' ' . number_format($data['max_purchase'], 2) . '</td>'; 99 echo '<td>' . esc_html($data['last_purchase']->date('Y-m-d')??'') . '</td>'; 98 100 echo '<td>' . esc_html($data['total_orders']) . '</td>'; 99 echo '<td>' . esc_html($data['currency']) . ' ' . number_format($data['total_amount'], 2) . '</td>';101 echo '<td>' . wp_kses_post($data['currency']) . ' ' . number_format($data['total_amount'], 2) . '</td>'; 100 102 echo '</tr>'; 101 103 }
Note: See TracChangeset
for help on using the changeset viewer.