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

Commit 2dc44a1

Browse files
Fix is_front_page() not working on WC shop page set as site's static 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.
1 parent c18a273 commit 2dc44a1

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

src/Hyyan/WPI/Pages.php

-2
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,6 @@ public function correctShopPage(\WP $wp) {
114114
$wp->query_vars['post_type'] = 'product';
115115
}
116116
}
117-
} else {
118-
$wp->query_vars['post_type'] = 'product';
119117
}
120118
}
121119

0 commit comments

Comments
 (0)