Skip to content

Commit

Permalink
[REST API] Fixed wrong error message when try update a product using …
Browse files Browse the repository at this point in the history
…the same name, closes woocommerce#11373
  • Loading branch information
claudiosanches committed Jul 7, 2016
1 parent 2ed2b6d commit 1ff19a3
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ public function update_item( $request ) {
if ( ! empty( $args['attribute_name'] ) ) {
$args['attribute_name'] = preg_replace( '/^pa\_/', '', wc_sanitize_taxonomy_name( stripslashes( $args['attribute_name'] ) ) );

$valid_slug = $this->validate_attribute_slug( $args['attribute_name'], true );
$valid_slug = $this->validate_attribute_slug( $args['attribute_name'], false );
if ( is_wp_error( $valid_slug ) ) {
return $valid_slug;
}
Expand Down

0 comments on commit 1ff19a3

Please sign in to comment.