diff --git a/includes/abstracts/abstract-wc-widget.php b/includes/abstracts/abstract-wc-widget.php index 22dd2be276b..21b1e9668de 100644 --- a/includes/abstracts/abstract-wc-widget.php +++ b/includes/abstracts/abstract-wc-widget.php @@ -225,7 +225,7 @@ abstract class WC_Widget extends WP_Widget { case 'text': ?>

- +

slug, $queried_object->taxonomy ); + $link = get_term_link( $queried_object->slug, $queried_object->taxonomy ); } // Min/Max. @@ -337,7 +337,7 @@ abstract class WC_Widget extends WP_Widget { // All current filters. if ( $_chosen_attributes = WC_Query::get_layered_nav_chosen_attributes() ) { // phpcs:ignore Squiz.PHP.DisallowMultipleAssignments.Found, WordPress.CodeAnalysis.AssignmentInCondition.Found foreach ( $_chosen_attributes as $name => $data ) { - $filter_name = sanitize_title( str_replace( 'pa_', '', $name ) ); + $filter_name = wc_attribute_taxonomy_name_raw( $name ); if ( ! empty( $data['terms'] ) ) { $link = add_query_arg( 'filter_' . $filter_name, implode( ',', $data['terms'] ), $link ); }