Merge pull request #14051 from woocommerce/fix/no-base-permalinks

Make sure there is a name, otherwise the taxonomy + base will conflict with other post types if empty
This commit is contained in:
Claudio Sanches 2017-04-06 14:29:45 -03:00 committed by GitHub
commit cdab73af3c
1 changed files with 1 additions and 1 deletions

View File

@ -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,