Skip to content

Related posts contain non-visible WooCommerce Products  #6354

@arjenlentz

Description

@arjenlentz

Steps to reproduce the issue

Products can be visible, hidden or search (meaning they must only show up in searches), this is stored in the _visibility meta key with a corresponding value 'visible', 'hidden', or 'search'.
Jetpack's related posts doesn't appear to take this into account, and thus happily shows hidden products.

To test this, create a hidden product and see it show up in Related posts from another product details page.

What I expected

Jetpack shouldn't do this. Considering Jetpack and WooCommerce come from the same Automattic stable, we can expect them to be aware of each other. Products that are not marked as visible should not be shown.
Logic: if there is a _visibility meta key, remove the post unless it has value of 'visible'.

What happened instead

Hidden products are visible in Related Posts.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions