-
Notifications
You must be signed in to change notification settings - Fork 151
feat: Remove currency symbol from AI form builder pricing fields #1736
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
base: develop
Are you sure you want to change the base?
feat: Remove currency symbol from AI form builder pricing fields #1736
Conversation
WalkthroughThis PR removes currency symbol display from pricing-related fields across Vue components and REST controllers, while updating AI prompt documentation to restrict pricing fields to post forms only. Changes include removing Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20–25 minutes
Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (4)
💤 Files with no reviewable changes (1)
🔇 Additional comments (11)
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 |
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.
Pull Request Overview
This PR removes the currency_symbol field from pricing-related form fields across the WPUF AI form builder. The changes centralize currency management to use system-level settings rather than per-field configurations.
- Removed
currency_symbolfrom AI prompt documentation for pricing fields - Removed
currency_symboldefault value assignments in backend field sanitization - Updated frontend Vue component to not display currency symbols alongside prices
Reviewed Changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| includes/AI/wpuf-ai-minimal-prompt.md | Removed currency symbol documentation and examples from pricing field prompts |
| includes/AI/wpuf-ai-minimal-prompt-registration.md | Removed all pricing field documentation from registration forms and added warnings that pricing fields are not allowed |
| includes/AI/RestController.php | Removed automatic currency_symbol default assignment in sanitize_form_fields method for pricing and cart_total fields |
| assets/js/components/FormSuccessStage.vue | Removed currency symbol display from pricing field templates and improved dropdown UI with added select caret icon |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| } | ||
| if (!isset($field['enable_quantity'])) { | ||
| $field['enable_quantity'] = 'no'; | ||
| } |
Copilot
AI
Nov 6, 2025
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.
The removal of currency_symbol default assignment in RestController.php appears inconsistent with the field templates in Field_Templates.php (lines 1434, 1467, 1497, 1529, 1561, 1582), which still define currency_symbol defaults. This creates a mismatch where template definitions include the property but the sanitization layer no longer sets it. Consider also removing currency_symbol from the field template definitions in includes/AI/Field_Templates.php or documenting why templates retain it while sanitization doesn't set it.
| } | |
| } | |
| if (!isset($field['currency_symbol'])) { | |
| $field['currency_symbol'] = '$'; | |
| } |
Title (Close issue )
Remove Currency Symbol Auto-Population from AI Form Builder
Description
This PR removes automatic currency symbol handling from the AI form builder's 3rd stage (sanitization) and success stage (preview). Currency symbols were being auto-populated by the system, but this should only occur if explicitly specified by users.
Changes
Type of Change
Testing
Checklist
Summary by CodeRabbit
UI Improvements
Documentation