API ignoring 'name' field.

Fixes #10929
This commit is contained in:
Mike Jolley 2016-05-17 17:53:50 +01:00
parent 19a4648a5a
commit 2d3d401d67
1 changed files with 1 additions and 1 deletions

View File

@ -308,7 +308,7 @@ class WC_API_Products extends WC_API_Resource {
);
if ( ! empty( $data['name'] ) ) {
array_merge( $new_product, array( 'post_name' => sanitize_title( $data['name'] ) ) );
$new_product = array_merge( $new_product, array( 'post_name' => sanitize_title( $data['name'] ) ) );
}
// Attempts to create the new product.