diff --git a/includes/class-wc-product-attribute.php b/includes/class-wc-product-attribute.php index cad8804b55a..4dc117dede3 100644 --- a/includes/class-wc-product-attribute.php +++ b/includes/class-wc-product-attribute.php @@ -74,7 +74,7 @@ class WC_Product_Attribute implements ArrayAccess { $term = get_term_by( 'id', $option, $this->get_name() ); } else { // Term names get escaped in WP. See sanitize_term_field. - $term = get_term_by( 'name', esc_attr( $option ), $this->get_name() ); + $term = get_term_by( 'name', $option, $this->get_name() ); if ( ! $term || is_wp_error( $term ) ) { $new_term = wp_insert_term( $option, $this->get_name() );