Skip to content
This repository has been archived by the owner on Mar 17, 2022. It is now read-only.

Commit

Permalink
Fix is_front_page() not working on WC shop page set as site's static …
Browse files Browse the repository at this point in the history
…front page

Not sure why this branch of IF conditional set post_type to 'product',
since post_type is not set when using WooCommerce shop page as site's
static front page. Removing this ELSE branch fix the issue and
everything else is working fine.

Tested with WooCommerce 3.1.2 and 3.2.1, switching default languages,
using both shop page as site's front page and on standalone shop
pages in all language versions.
  • Loading branch information
marian-kadanka committed Oct 30, 2017
1 parent c18a273 commit 2dc44a1
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/Hyyan/WPI/Pages.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,6 @@ public function correctShopPage(\WP $wp) {
$wp->query_vars['post_type'] = 'product';
}
}
} else {
$wp->query_vars['post_type'] = 'product';
}
}

Expand Down

0 comments on commit 2dc44a1

Please sign in to comment.