Fix attribute text based in API, closes #8823
This commit is contained in:
parent
934808fc37
commit
1d0d48b1ad
|
@ -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' );
|
||||
|
|
|
@ -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' );
|
||||
|
|
Loading…
Reference in New Issue