-
Notifications
You must be signed in to change notification settings - Fork 215
fix: update commission calculation methods for admin and vendor earnings and add filter on them and remove that filter from get_earning_by_order #2723
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
…ngs and add filter on them and remove that filter from get_earning_by_order
""" WalkthroughThe changes refactor how commission values are retrieved and filtered in the commission calculation logic. The Changes
Sequence Diagram(s)sequenceDiagram
participant Caller
participant Commission
participant OrderCommission
Caller->>Commission: get_earning_by_order(order, recipient)
Commission->>OrderCommission: get_vendor_earning() or get_admin_commission()
OrderCommission->>OrderCommission: Calculate earning/commission
OrderCommission->>OrderCommission: Apply 'dokan_get_earning_by_order' filter
OrderCommission-->>Commission: Return filtered value
Commission-->>Caller: Return value
Assessment against linked issues
Suggested labels
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (4)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
We have decided no to use 👇 See the below descussion |
@Aunshon vai, is it tested and checked for the hotfix version? |
@jamil-mahmud Vai we decided not to merge this pr and we recommend user to customize as mentioned. |
All Submissions:
Closes
How to test the changes in this Pull Request:
Consume
dokan_get_earning_by_order
filter and add a fee and watch the order details page if fee was added successfully.And test also the refund.
Changelog entry
Summary by CodeRabbit
New Features
Chores