#51512 closed defect (bug) (invalid)
WordPress 5.5 Core XML Sitemap Includes Hidden WooCommerce Products In the Sitemap
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 5.5.1 |
Component: | Sitemaps | Keywords: | |
Focuses: | Cc: |
Description
I'm using WP 5.5.1 and WooCommerce 4.5.2. I just discovered that products with their catalog visibility set to "hidden" in WooCommerce show up in the WordPress XML sitemap, and are then crawled and indexed by Google. Hidden products shouldn't be in the sitemap.
I realize this isn't just a WP Core issue, but since the default configuration of the Sitemap includes WooCommerce products, and there are probably thousands of WooCommerce users out there that are suddenly, unknowingly publishing the links to their hidden products with XML Sitemaps, it constitutes a bug in Core.
To reproduce the problem:
- Create a new product in WooCommerce
- In the "Publish" section in the right sidebar, set the "catalog visibility" to "hidden."
- Save the product.
- Copy the link to the product.
- Browse to the site's sitemap.
- Select the posts, product sitemap.
- Use your browser's search function to search for the product's URL.
A WooCommerce product's visibility is set in the wp_postmeta table in a row with the meta_key of "_product_attributes" as an integer value for "is_visible."
:wave:
Please raise an issue on GitHub here: https://github.com/woocommerce/woocommerce
Since this is not a Core issue, it cannot be addressed / fixed here.
I'm closing this ticket for the Core team's workflow, but please do contact WC directly.
The ticket can be reopened later if it is found that there is an issue with Core itself.
All the best!