WooCommerce product permalink based on product's current category

1 week ago 13

I did immoderate probe but was incapable to find a clue. Here is the scenario:

There is simply a merchandise called "Album" which is assigned to some the "Music" & "Others" categories. The merchandise permalink has been acceptable to Custom base: /shop/%product_cat%/. Now, if I effort to browse this merchandise utilizing the pursuing URLs past some volition enactment fine:

Not definite however WooCommerce is deciding the permalink but if I browse Music class past I'd expect that the merchandise URL volition be: http://dev.local/shop/music/album/ and if I browse Others class past I'd expect that the merchandise URL volition be: http://dev.local/shop/others/album/ respectively. But, it doesn't happen.

If I fetch the merchandise utilizing customized WP_Query based connected product_cat past I tin acceptable my desired permalink.

Is determination immoderate different mode that I tin override the permalink based connected the existent merchandise category?

Thank you!

Read Entire Article

Our Ventures