fix for Error rendering WooCommerce Shop as Front Page at Stargazer Parent Theme #5531

This commit is contained in:
Thiago Senna 2014-05-21 10:27:26 -03:00
parent bbd7b16c17
commit 370d3e0348
1 changed files with 2 additions and 0 deletions

View File

@ -186,6 +186,8 @@ class WC_Query {
$wp_post_types['product']->ID = $shop_page->ID;
$wp_post_types['product']->post_title = $shop_page->post_title;
$wp_post_types['product']->post_name = $shop_page->post_name;
$wp_post_types['product']->post_type = $shop_page->post_type;
$wp_post_types['product']->ancestors = get_ancestors( $shop_page->ID, $shop_page->post_type );
// Fix conditional Functions like is_front_page
$q->is_singular = false;