• With WooCommerce SEO 1.1.5, urls for product feeds break, apparently due to this bit of code around line 779 of wpseo-woocommerce.php:

    /**
    	 * Filters the archive link on the product sitemap
    	 *
    	 * @param string $link
    	 * @param string $post_type
    	 *
    	 * @return bool
    	 */
    	function xml_post_type_archive_link( $link, $post_type ) {
    
    		if ( $post_type === 'product' ) {
    			return false;
    		} else {
    			return $link;
    		}
    	}

    If we are returning false, then, well…we’re returning false. The issue is that this breaks validation on the shop, category, and product pages entirely (aside from not having a feed url), as the offending resultant HTML looks like this:

    <link rel="alternate" type="application/rss+xml"  title="New products" href="" />

    and an href attribute must not be empty.

    Any thoughts on why this is like it is? I’m not very familiar with any Yoast plugins, and I have only really glanced at the code, so I’m not sure why one would want to do this in the above function.

    https://www.ads-software.com/plugins/wordpress-seo/

Viewing 1 replies (of 1 total)
  • Thread Starter Lewis Rosenthal

    (@lewisr)

    Moved to github, per posting directions here.

    Feel free to close here, though I’m curious if anyone else has encountered the same type of thing who otherwise does not follow the project activity on github.

    Thanks

    Lewis

Viewing 1 replies (of 1 total)
  • The topic ‘Product feeds break with WooCommerce SEO’ is closed to new replies.