Closed Aunshon closed 1 week ago
The changes involve significant updates to the Settings
and SetupWizard
classes, focusing on the validation of pricing and commission settings. The format_price_values
method has been replaced by validate_fixed_price_values
, which enforces stricter validation rules for price settings. Additionally, the dokan_setup_commission_save
method has been enhanced to validate commission percentages before saving. Minor adjustments were made to the CombineInput
component to improve input validation and formatting. Overall, the modifications enhance the robustness and reliability of settings handling.
File | Change Summary |
---|---|
includes/Admin/Settings.php | - Removed method: format_price_values - Added method: validate_fixed_price_values - Updated filter to use new validation method and changed return type from void to array . |
includes/Admin/SetupWizard.php | - Updated dokan_setup_commission_save method to include validation for commission percentage input, ensuring it is within the range of 0 to 100. |
src/admin/components/CombineInput.vue | - Updated watch property and onInput method for improved validation and formatting of input values. - Corrected property name from fixexName to fixedName . |
🐇 In the land of code, where changes bloom,
New validations rise, dispelling the gloom.
Prices and commissions, all in their place,
With checks in the code, we quicken the pace.
A hop and a skip, through logic we glide,
In the world of settings, let clarity abide! 🌼
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?
Restrict admin commission percentage from 0 to 100
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
Release Notes
New Features
Bug Fixes
Documentation
Style