-
Notifications
You must be signed in to change notification settings - Fork 869
WooCommerce 3.0 - Hidden products showing in search results #1068
Comments
Apparently this is always an issue when you return WooCommerce products in a search outside of the WooCommerce loop. This is because the "hidden" status of a post is unique to WooCommerce and is not recognized in WordPress core. @newtlabs what do we need to improve on in your custom function to make it apart of FoundationPress? On a semi-relevant note, we could start putting all WooCommerce related functions in a new file at |
@colin-marshall, the _s theme takes this approach: https://github.com/Automattic/_s/blob/master/inc/woocommerce.php |
Is this still an issue? |
@olefredrik after thinking about this further, I don't think this change should be added to the framework. I don't see any similar functionality in starter theme _s, or even in the "full-blown" Storefront theme, which is the official WooCommerce theme. Further, modifying the search query will degrade performance. Source: woocommerce/woocommerce#12308 (comment) Since a small percentage of people using FoundationPress will also use WooCommerce, it would degrade search query performance with zero benefit for the majority of our users. The best solution for us is to exclude it from FoundationPress and advise people to use search query modifying plugins or add their own function to a project. |
How can this bug be reproduced?
What did you expect to happen?
I expected to see no hidden products shown in search result
What happened instead?
I saw hidden products
The search needs changing, heres what I'm currently using as a custom function to get around this issue for now until I have more time or when someone else can fix:
Cheers!
The text was updated successfully, but these errors were encountered: