-
Notifications
You must be signed in to change notification settings - Fork 215
Fix: empty spaces before the store url in the vendor registration form #2326
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
Fix: empty spaces before the store url in the vendor registration form #2326
Conversation
WalkthroughThe recent changes improve the readability and maintainability of PHP templates associated with customer and vendor account management. By condensing the layout of Changes
Poem
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? TipsChatThere are 3 ways to chat with CodeRabbit:
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 as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (2)
- templates/account/update-customer-to-vendor.php (1 hunks)
- templates/global/seller-registration-form.php (1 hunks)
Files skipped from review due to trivial changes (2)
- templates/account/update-customer-to-vendor.php
- templates/global/seller-registration-form.php
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- templates/account/vendor-registration.php (2 hunks)
Additional comments not posted (3)
templates/account/vendor-registration.php (3)
3-5: Approved: Conditional check forwc_print_noticesfunction.The addition of a conditional check before calling
wc_print_noticesimproves code robustness by preventing potential errors if the function is not defined.
7-8: Approved: Introduction of$home_urland$custom_store_urlvariables.The introduction of these variables improves code readability and potentially enhances performance by avoiding repeated function calls.
69-69: Approved: Rendering of shop URL with new variables.The shop URL is now rendered using the newly introduced
$home_urland$custom_store_urlvariables, enhancing code readability while maintaining functionality.
…url-in-registration-form # Conflicts: # templates/account/vendor-registration.php
All Submissions:
Changes proposed in this Pull Request:
This PR fixes an issue where empty spaces appear before the store URL in the vendor registration form. The change involves trimming any leading or trailing whitespace from the store URL input before processing or saving it.
Related Pull Request(s)
Closes
How to test the changes in this Pull Request:
Changelog entry
Fix: Remove empty spaces before store URL in vendor registration form
Previously, if a user entered spaces before or after the store URL in the vendor registration form, these spaces were retained, potentially causing issues with the store URL. This PR implements a fix to trim any leading or trailing whitespace from the store URL input, ensuring a clean and valid URL is always saved.
Before Changes
When a user enters spaces before or after the store URL in the vendor registration form, these spaces are retained in the saved URL. This can lead to invalid URLs or unexpected behavior when accessing the store.
After Changes
After implementing the fix, any spaces entered before or after the store URL in the vendor registration form are automatically removed. The saved URL is clean and valid, improving the user experience and preventing potential URL-related issues.
Feature Video (optional)
N/A
PR Self Review Checklist:
FOR PR REVIEWER ONLY:
Summary by CodeRabbit