Fix product feed when using shop base
This commit is contained in:
parent
479a136edb
commit
b188ad8250
|
@ -264,6 +264,11 @@ class WC_Query {
|
|||
}
|
||||
}
|
||||
|
||||
// Fix product feeds
|
||||
if ( $q->is_feed() && $q->is_post_type_archive( 'product' ) ) {
|
||||
$q->is_comment_feed = false;
|
||||
}
|
||||
|
||||
// Special check for shops with the product archive on front
|
||||
if ( $q->is_page() && 'page' === get_option( 'show_on_front' ) && absint( $q->get( 'page_id' ) ) === wc_get_page_id( 'shop' ) ) {
|
||||
|
||||
|
|
|
@ -134,7 +134,7 @@ add_filter( 'loop_end', 'woocommerce_reset_loop' );
|
|||
|
||||
/**
|
||||
* Products RSS Feed.
|
||||
*
|
||||
* @deprecated 2.6
|
||||
* @access public
|
||||
*/
|
||||
function wc_products_rss_feed() {
|
||||
|
|
|
@ -20,10 +20,8 @@ add_filter( 'post_class', 'wc_product_post_class', 20, 3 );
|
|||
/**
|
||||
* WP Header.
|
||||
*
|
||||
* @see wc_products_rss_feed()
|
||||
* @see wc_generator_tag()
|
||||
*/
|
||||
add_action( 'wp_head', 'wc_products_rss_feed' );
|
||||
add_action( 'get_the_generator_html', 'wc_generator_tag', 10, 2 );
|
||||
add_action( 'get_the_generator_xhtml', 'wc_generator_tag', 10, 2 );
|
||||
|
||||
|
|
Loading…
Reference in New Issue