Fix condition to check gateway fee in OrderCommission#3028
Fix condition to check gateway fee in OrderCommission#3028danielbreves wants to merge 1 commit intogetdokan:developfrom
Conversation
WalkthroughModified the guard condition in Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🔇 Additional comments (1)
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. Comment |
All Submissions:
Changes proposed in this Pull Request:
This pull request fixes an incorrect conditional check in the
get_dokan_gateway_feemethod.The logic previously checked
! empty( $processing_fee )when determining whether to apply thedokan_gateway_fee_paid_bymeta key.The updated condition now checks
! empty( $gateway_fee ), ensuring paid_by is set when a valid gateway fee exists.Related Pull Request(s)
How to test the changes in this Pull Request:
dokan_gateway_fee_paid_bymeta value is applied only when$gateway_feeis present.processing_feebut nogateway_fee— the gateway fee logic should not be applied.Changelog entry
Bug Fix: Corrected conditional logic in
get_dokan_gateway_feeso the gateway fee handling is based on$gateway_feeinstead of$processing_fee.Previously, the method incorrectly used
$processing_feeto determine whether to apply the gateway fee logic.Before Changes
The gateway fee logic would not me triggered as
processing_feewas not present, causing inaccurate commission behavior.After Changes
Gateway fee logic now correctly triggers only when a gateway fee exists, ensuring accurate fee calculation and vendor payouts.
Feature Video (optional)
N/A
PR Self Review Checklist:
FOR PR REVIEWER ONLY:
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.