• Resolved titsmaker

    (@titsmaker)


    Hi. I am having an issue with product permalinks not using primary category I selected via your plugin’s functionality.
    I am sorry for disturbing you, but I was not able to find anywhere unambiguous information if WooCommerce permalinks are supported.
    On one hand here on support forum you stated many times that only %category% permalinks are supported. On the other hand the bullets for selecting primary category are shown for products which makes me think that %product_cat% is supported as well.
    Can you please shed some light on the topic.
    Is this a bug on my side or permalinks for WooCommerce are not supported?
    I am using latest WP and WooCommerce versions, product permalinks base is set to /shop/%product_cat%/

    P.S. thanks for great, not bloated plugin!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Sybre Waaijer

    (@cybr)

    Hello!

    Thank you for the report. I opened a GitHub issue on this:
    https://github.com/sybrew/the-seo-framework/issues/484

    The snippet below should be the workaround on this issue. Please note that it’s untested, and you may need to clear the site’s cache after implementing it.

    add_action( 'the_seo_framework_after_init', function() { 
    	add_filter( 'wc_product_post_type_link_product_cat', [ the_seo_framework(), '_adjust_post_link_category' ], 10, 3 );
    } );

    Cheers!

    Thread Starter titsmaker

    (@titsmaker)

    Your support is the best!
    It helped, thanks a lot.
    Should I disable this code snippet after next update?

    Plugin Author Sybre Waaijer

    (@cybr)

    Thank you! I’m glad it worked as intended.

    The filter won’t conflict with what we’re going to implement it in the next update. But, it’ll become redundant. So, yes, you might as well remove it then.

    Cheers!

    Plugin Author Sybre Waaijer

    (@cybr)

    Howdy @titsmaker!

    The latest update (TSF v4.0.3) now contains the fix, and I also fixed the breadcrumb output while I was at it ?? Cheers!

    Thread Starter titsmaker

    (@titsmaker)

    You’re awesome! I wish every developer has your attitude to his product.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Primary category permalinks for WooCommerce’ is closed to new replies.