-
Notifications
You must be signed in to change notification settings - Fork 137
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
Product with ALL CAPS name isn't synced with Facebook #2582
Comments
The plugin checks if the product description or product name is in ALL CAPS. If yes then it doesn't sync those products with FB. We want to change this behavior. We want the products to sync and show a warning or notice informing user about Facebook's ALL CAPS guideline. I searched for "product sync" in the repo and found ProductValidator.php file has validation functions for product description and product name.
Here's my approach:
|
I was going to call the existing validate() function and make a call to a custom function that shows notice if ALL CAPS condition is true. However, this doesn't seem good approach as my custom function will be called everytime validate() is called. This would mean every time code wants to check if a FB product should be synced, my custom function will show a notice. So I have changed my approach slightly.
I noticed a downside to this approach as well. There are a bunch of validation functions along with
I'll give it some more thought if I want a separate all caps validation function or just do all caps check in the same function. I'm yet to figure out how to show pop-up modal window for notice. |
Facebook recommends sentence case and not ALL CAPS for product titles. However, it is still a requirement (not just a guideline) for product description. Altering this issue to focus on removing validation for product titles only. |
We have decided to show the warning in the Facebook panel (bottom right corner) on the product edit page instead of a modal window. So we no longer need |
🔎 Isolate the bug
✍️ Describe the bug
The product isn't synced to Facebook if the product name is in All CAPS. Facebook has specified guidelines for avoiding product names with all caps but it isn't a rule. The existing behavior isn't necessarily unexpected but we would want to sync the product and show a warning instead.
🚶♀️ Steps to reproduce
✔️ Actual behavior
The newly created product won't appear in the Facebook catalog. You can see "Do not sync" beside these products on the All Products page.
✔️ Expected behavior
The product should be synced to the Facebook catalog. Also, we would want a warning stating Facebook's guideline of not setting product names in all caps.
The text was updated successfully, but these errors were encountered: