Make WordPress Core

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#51512 closed defect (bug) (invalid)

WordPress 5.5 Core XML Sitemap Includes Hidden WooCommerce Products In the Sitemap

Reported by: linux4me2's profile linux4me2 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:

  1. Create a new product in WooCommerce
  2. In the "Publish" section in the right sidebar, set the "catalog visibility" to "hidden."
  3. Save the product.
  4. Copy the link to the product.
  5. Browse to the site's sitemap.
  6. Select the posts, product sitemap.
  7. 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."

Change History (2)

#1 @carike
4 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed

: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!

#2 @linux4me2
4 years ago

I have a feeling they're going to point their fingers back this way, but I have posted it here.

Note: See TracTickets for help on using tickets.