Fix condition to check gateway fee in OrderCommission #3028
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.