Closed MdAsifHossainNadim closed 4 weeks ago
The changes in this pull request introduce a new filter to the WooCommerce admin revenue report charts, which excludes coupon-related data from the revenue reports. Additionally, the Assets
class is updated to register and enqueue a new script for the analytics feature, ensuring the relevant JavaScript is loaded in the admin interface. Minor formatting adjustments were also made to maintain consistency in the code structure.
File | Change Summary |
---|---|
assets/src/js/dokan-admin-analytics.js | Added a filter using wp.hooks.addFilter to exclude 'coupons' from revenue report data. A TODO comment indicates future removal. |
includes/Assets.php | Modified enqueue_admin_scripts to load dokan-admin-analytics script and updated get_scripts to register it. Minor formatting change in get_styles . |
ensure_vendor_coupon
method, which is relevant as the main PR introduces a filter that modifies revenue report data related to coupons, indicating a connection in handling coupon-related functionalities.:+1: Dev Review Done
, Need Dev Review Only
, Upcoming Release
In the admin's bright domain,
Coupons now won't cause a strain.
With analytics in the fray,
Data's clearer every day!
Hopping through the code so neat,
Changes make our work complete! 🐇✨
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?
Scenario: Coupon still exists in the revenue table.
N.B. overall test issue.
Steps to reproduce:
Screenshot:
Scenario: The gross total amount is incorrect when a multivendor order is placed with a coupon
Steps to reproduce:
Screenshot:
Scenario: PHP warning after upgrader run
N.B. Overall test Issue
Steps to reproduce:
PHP warning:
[28-Oct-2024 09:14:47 UTC] PHP Warning: filemtime(): stat failed for /var/www/html/public/wp-content/plugins/dokan-lite/assets/src/js/dokan-admin-analytics.js in /var/www/html/public/wp-content/plugins/dokan-lite/includes/Assets.php on line 563
All Submissions:
Changes proposed in this Pull Request:
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
New Features
Bug Fixes