facebook-for-woocommerce
facebook-for-woocommerce copied to clipboard
WooCommerce Categories starting with a number fail to pass information to Facebook product category
π Isolate the bug
- [X] I have confirmed this occurs in the most recent version of WordPress, WooCommerce, and Facebook for WooCommerce.
- [X] I have confirmed this occurs when only WooCommerce and Facebook for WooCommerce are active and when using a default WordPress or WooCommerce theme.
βοΈ Describe the bug
When a category name starts with a number ( digit like 1,2, etc. ) the Facebook product category automatically assigns a default predefined category, not from WooCommerce. Depending on the starting number value, determines which predefined category Facebook assigns.
Information within logs does not appear out of the ordinary :
[category] => 5ategory with a dash and dot
πΆββοΈ Steps to reproduce
- Create a product and sync it to Facebook.
- Assign a category that starts with a number i.e
5 Turtle Doves
- View the Edit Item page on Facebook from Catalog > Items > Edit Item
- See predefined category is assigned and category from WooCommerce ignored.
Screenshot link: https://d.pr/i/vFOKPM
βοΈ Expected behavior
The expectation is for a category name allowed in WooCommerce to be created as-is within Facebook. This should apply to parent and child/nested categories.
π Logs
09-15-2022 @ 20:37:20 - Request
uri: https://graph.facebook.com/v13.0/5310171189066632
body: Array
(
[name] => Test 17
[description] => Test 17
[image_url] => https://square-testing.mystagingwebsite.com/wp-content/uploads/woocommerce-placeholder.png
[additional_image_urls] =>
[url] => https://square-testing.mystagingwebsite.com/product/test-17/
[category] => 5ategory with a dash and dot
[brand] => My WordPress Site
[retailer_id] => sku17_29787
[price] => 999
[currency] => USD
[availability] => in stock
[visibility] => published
[sale_price_start_date] => 1970-01-29T00:00+00:00
[sale_price_end_date] => 2038-01-17T23:59+00:00
[sale_price] => 0
)
timeout: 500
method: POST
09-15-2022 @ 20:37:20 - Response
code: 200
message: OK
body: {"success":true}
Thanks for reporting this, @johndcoy.
I was able to reproduce this. Not sure if this is a new behaviour but It seems like Meta/Facebook is setting the Google Product Category to the category value and when this start with a number matching one of the Google Category, this is set instead.
I will need to discuss this issue with the team. It is possible that the category name needs to match Product Category Guidelines
This issue was due to a bug in Meta's UI. We have verified this is now fixed. However, there's a chance that automatic categories will step in to correct invalid categories to adhere to tax regulations for Facebook checkout sellers.