Conversation
hookAdditionalCustomerFormFields() always wrapped the newsletter conditions in a line break and an emphasis element, so when no conditions text is configured (NW_CONDITIONS empty) the label ended with a stray "<br><em></em>". Only emit the markup when there is some conditions text to show; otherwise the label is just "Sign up for our newsletter".
|
Hello @boo-code! This is your first pull request on ps_emailsubscription repository of the PrestaShop project. Thank you, and welcome to this Open Source community! |
Removed comments regarding rendering conditions in the customer form fields.
kpodemski
approved these changes
Jul 2, 2026
mattgoud
approved these changes
Jul 2, 2026
Contributor
|
thank you @boo-code |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
hookAdditionalCustomerFormFields()builds the newsletter checkbox label by always wrapping the newsletter conditions in<br>+<em>…</em>. When the "Newsletter conditions" setting (NW_CONDITIONS) is empty for the language, the label ends with a straySign up for our newsletter<br><em></em>, adding an empty line and emphasis element under the checkbox. The fix only emits the<br>/<em>markup when there is actually some conditions text; otherwise the placeholders collapse and the label is simply "Sign up for our newsletter". The same translation key is kept, so no new wording is introduced.Sign up for our newsletter<br><em></em>. After:Sign up for our newsletter. With conditions text configured the label is unchanged (Sign up for our newsletter<br><em>…</em>) — verified both cases.Reported by @darkf3d3.