Fix attribute text based in API, closes #8823

This commit is contained in:
Claudio Sanches 2015-08-14 15:22:57 -03:00
parent 934808fc37
commit 1d0d48b1ad
2 changed files with 2 additions and 2 deletions

View File

@ -859,7 +859,7 @@ class WC_API_Products extends WC_API_Resource {
// Text based attributes - Posted values are term names - don't change to slugs
} else {
$values = array_map( 'stripslashes', array_map( 'strip_tags', explode( WC_DELIMITER, $attribute['options'] ) ) );
$values = array_map( 'wc_sanitize_term_text_based', explode( WC_DELIMITER, $attribute['options'] ) );
}
$values = array_filter( $values, 'strlen' );

View File

@ -864,7 +864,7 @@ class WC_API_Products extends WC_API_Resource {
// Text based attributes - Posted values are term names - don't change to slugs
} else {
$values = array_map( 'stripslashes', array_map( 'strip_tags', explode( WC_DELIMITER, $attribute['options'] ) ) );
$values = array_map( 'wc_sanitize_term_text_based', explode( WC_DELIMITER, $attribute['options'] ) );
}
$values = array_filter( $values, 'strlen' );