Version 1.6.3 breaks woocommerce in child page
-
When the woocommerce shop page is set to a page that is a child page, this plugin interferes with the product query, resulting in no products being found.
In wp-nested-pages 1.6.3 $wp_query->request is set to:
SELECT SQL_CALC_FOUND_ROWS wp_posts.ID FROM wp_posts INNER JOIN wp_postmeta ON ( wp_posts.ID = wp_postmeta.post_id ) WHERE 1=1 AND wp_posts.ID = 1608 AND ( ( wp_postmeta.meta_key = '_visibility' AND wp_postmeta.meta_value IN ('visible','catalog') ) ) AND wp_posts.post_type = 'product' AND (wp_posts.post_status = 'publish' OR wp_posts.post_status = 'closed' OR wp_posts.post_status = 'acf-disabled' OR wp_posts.post_status = 'private' OR wp_posts.post_status = 'hidden') GROUP BY wp_posts.ID ORDER BY wp_posts.post_date DESC, wp_posts.ID DESC LIMIT 0, 10
(where 1608 is the page id I’ve set the shop page to)
This generates an empty sql result.In wp-nested-pages 1.5.4 $wp_query->request is set to:
SELECT SQL_CALC_FOUND_ROWS wp_posts.ID FROM wp_posts INNER JOIN wp_postmeta ON ( wp_posts.ID = wp_postmeta.post_id ) WHERE 1=1 AND ( ( wp_postmeta.meta_key = '_visibility' AND wp_postmeta.meta_value IN ('visible','catalog') ) ) AND wp_posts.post_type = 'product' AND (wp_posts.post_status = 'publish' OR wp_posts.post_status = 'closed' OR wp_posts.post_status = 'acf-disabled' OR wp_posts.post_status = 'private' OR wp_posts.post_status = 'hidden') GROUP BY wp_posts.ID ORDER BY wp_posts.post_date DESC, wp_posts.ID DESC LIMIT 0, 10
This generates the wanted sql results.
This does not happen if I set the woocommerce shop page to a top level page (i.e.
AND wp_posts.ID = x
is not injected)
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Version 1.6.3 breaks woocommerce in child page’ is closed to new replies.