From 56eb3c4da3fb813ba3c971286d4d3da53a8bda28 Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Thu, 6 Apr 2017 17:50:04 +0100 Subject: [PATCH] Make sure there is a name, otherwise the taxonomy + base will conflict with other post types if empty --- includes/class-wc-post-types.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/class-wc-post-types.php b/includes/class-wc-post-types.php index fae40c0ec40..1feb5ed9a0f 100644 --- a/includes/class-wc-post-types.php +++ b/includes/class-wc-post-types.php @@ -223,7 +223,7 @@ class WC_Post_types { ), ); - if ( 1 === $tax->attribute_public ) { + if ( 1 === $tax->attribute_public && sanitize_title( $tax->attribute_name ) ) { $taxonomy_data['rewrite'] = array( 'slug' => trailingslashit( $permalinks['attribute_rewrite_slug'] ) . sanitize_title( $tax->attribute_name ), 'with_front' => false,