Skip to content
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

Fixed Maximum fee value option is not working as expected. #236

Merged
merged 2 commits into from
Jul 5, 2024

Conversation

mokshasharmila13
Copy link
Contributor

Fix #235. Added a check when the maximum fees are set.

@mokshasharmila13 mokshasharmila13 added the type: bug Something isn't working label Jun 4, 2024
@mokshasharmila13 mokshasharmila13 added this to the Future Milestone milestone Jun 4, 2024
@mokshasharmila13 mokshasharmila13 self-assigned this Jun 4, 2024
@tyche-bot
Copy link
Collaborator

tyche-bot commented Jun 4, 2024

4 Warnings
⚠️ Please limit commit subject line to 50 characters.
c3f11ff
⚠️ Please remove period from end of commit subject line.
c3f11ff
⚠️ Please limit commit subject line to 50 characters.
f524e8a
⚠️ Please remove period from end of commit subject line.
f524e8a

Generated by 🚫 Danger

@@ -549,7 +549,7 @@ public function calculate_the_fee( $args, $final_fee_to_add, $total_in_cart, $fe
$max_fee = 0;
}
// Max fee.
if ( 0 != $max_fee && $new_fee > $max_fee ) { //phpcs:ignore
if ( 0 != $max_fee && $new_fee < $max_fee ) { //phpcs:ignore
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mokshasharmila13 This is incorrect. This will not work when the fee value & max fee value is a positive value. You need to check for both positive & negative values

@mokshasharmila13 mokshasharmila13 merged commit 7e9b4f5 into master Jul 5, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Maximum fee value option is not working as expected
4 participants