Merge pull request #15594 from woocommerce/fix/15561

Remove escape to fix saving of Special characters in attributes
This commit is contained in:
Claudio Sanches 2017-06-13 14:28:39 -03:00 committed by GitHub
commit 6d1c133a3e
1 changed files with 1 additions and 1 deletions

View File

@ -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() );