Open mrabbani opened 1 week ago
The changes involve significant updates to the QueryFilter
class in the WooCommerce Analytics reports for Dokan orders. Key modifications include enhancements to SQL query filtering, improved total calculations with conditional logic, and the addition of new data points in report columns. Corresponding tests have been adjusted to incorporate a mock Commission
class, refining the validation of order statistics. Overall, these updates aim to improve the accuracy and clarity of analytics related to Dokan's order processing.
File | Change Summary |
---|---|
includes/Analytics/Reports/Orders/Stats/QueryFilter.php |
Updated register_hooks , modify_admin_report_columns , add_select_subquery_for_total , and add_where_subquery_for_vendor_filter methods for enhanced SQL filtering and accurate calculations for vendor earnings and report columns. |
tests/php/src/Analytics/Reports/OrderQueryFilterTest.php |
Introduced Commission mock, updated test_dokan_order_stats_fields_are_selected_for_seller for better data retrieval, and adjusted test_filter_hooks_are_applied_for_orders_query . |
tests/php/src/Analytics/Reports/OrderStatsQueryFilterTest.php |
Added Commission import, commented out assertions in test_order_stats_hook_registered , removed test_dokan_order_stats_added_to_wc_select_query_for_seller , and renamed test_dokan_order_stats_added_to_wc_select_query_for_admin . |
tests/php/src/Analytics/Reports/ReportTestCase.php |
Added Commission import, commented out financial metrics in get_dokan_stats_data , and introduced tear_down method for cleanup. |
QueryFilter
class for Dokan orders, related to filtering coupon information in the dokan-admin-analytics.js
file.QueryFilter
class for order statistics.QA approved
, :+1: Dev Review Done
🐰 In the fields where orders flow,
The stats now shine, a brighter glow.
With filters set and totals right,
Dokan's reports take flight tonight!
So hop along, let data play,
In WooCommerce, we find our way! 🌟
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
All Submissions:
Changes proposed in this Pull Request:
Update the
SQL
condition to sum of the Dokan Total e.i.total_admin_commission
,total_vendor_earning
, and etc.Related Pull Request(s)
Closes
How to test the changes in this Pull Request:
Changelog entry
Title
Detailed Description of the pull request. What was previous behaviour and what will be changed in this PR.
Before Changes
Describe the issue before changes with screenshots(s).
After Changes
Describe the issue after changes with screenshot(s).
Feature Video (optional)
Link of detailed video if this PR is for a feature.
PR Self Review Checklist:
FOR PR REVIEWER ONLY:
Summary by CodeRabbit
Commission
class, improving validation of order statistics.