[wp-trac] [WordPress Trac] #51512: WordPress 5.5 Core XML Sitemap Includes Hidden WooCommerce Products In the Sitemap

WordPress Trac noreply at wordpress.org
Tue Oct 13 20:49:35 UTC 2020


#51512: WordPress 5.5 Core XML Sitemap Includes Hidden WooCommerce Products In the
Sitemap
--------------------------+-----------------------------
 Reporter:  linux4me2     |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Sitemaps      |    Version:  5.5.1
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 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
 1. In the "Publish" section in the right sidebar, set the "catalog
 visibility" to "hidden."
 1. Save the product.
 1. Copy the link to the product.
 1. Browse to the site's sitemap.
 1. Select the posts, product sitemap.
 1. 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."

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/51512>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list