Fix for Primary Category not working in WooCommerce Products
-
Setting a Primary Category in a WooCommerce Product does not reflect any changes in the permalink when using pretty permalinks settings that have the product category included.
It does not work when I upload products from a csv and import the “Meta: _yoast_wpseo_primary_product_cat” column as meta data, and it doesn’t work if I edit a product manually and set the primary category. I’ve also reset permalinks and cleared cache to see if that would help, but it didn’t.
I’ve seen multiple support threads here as well as bug reports in github regarding this issue, easily found by googling “yoast woocommerce primary category not working”, and the only thing that has fixed this issue is by using a php snippet from 2016 found here https://github.com/Yoast/wordpress-seo/issues/4528#issuecomment-232263154 and I feel like this should have been resolved officially by Yoast by now. I don’t want to keep using a piece of php in my functions.php that I found randomly posted on the web which is now 3 years old .
What’s the deal?
- The topic ‘Fix for Primary Category not working in WooCommerce Products’ is closed to new replies.