-
Notifications
You must be signed in to change notification settings - Fork 146
Closed
Description
In the file class-wc-api-products.php there's this code at line 330
// Product name (slug).
if ( isset( $data['name'] ) ) {
wp_update_post( array( 'ID' => $id, 'post_name' => sanitize_title( $data['name'] ) ) );
}
It's nowhere in the official documentation that 'name' is a property for a product and that it can be used to set the post_name, that's responsible for the product's url.
IMHO it's definitely worth mentioning in the docs, since modifying the post_name is an urgent feature, and I accidentally found it in the code.
btw. maybe it should also be implemented in the product create function
Metadata
Metadata
Assignees
Labels
No labels