• Resolved tavletti

    (@tavletti)


    Hi!

    I’ve changed product links with “post_type_link” hook, to make it better, and it works well for the entire website. But at your feeds it is not affecting links at all, so we have like “old” not working links at feed. Can you help me with that?

    I’ve added that hook at theme on “init” hook, like that:

    
    add_action('init', array($this, 'handle_setup'));
    
    function handle_setup(){
      ...
      add_filter('post_type_link', array($this, 'product_link'), 999999, 3);
      ...
    }
    
    

    Where at “product_link” function all changes are happening.

    Could you please advice on where I should put that function to make it work for the feeds?

    Thank you

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi,

    Thanks for using our plugin and reaching out to us.

    Our plugin is fetching the product URL directly from WordPress using this function:

    
    $product_data['link'] = get_permalink( $product_data['id'])."$utm_part";
    

    It can be found on line 2746 of the class-get-products.php file that sits in this directory: ../wp-content/plugins/woo-product-feed-pro/classes/

    Thread Starter tavletti

    (@tavletti)

    Thank you!
    Actually, it is already solved. For some reason that does not work for feeds that I created previously, as every time when I click “rebuild” XML feed – it still builds using the old permalink structure. So I had to clone that feeds and restart them to make it work…
    Anyway, thank you!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Product permalinks are not working’ is closed to new replies.