Replies: 0
Hi,
Im doing the code bellow in my REST API call. What i have noticed is that this code changes the permalinks(to the one defined in slug) on some products and NOT on some others. Im not sure why. How could i make sure that the permalniks are ALWAYS rewriten to the new defined “slug”(or title)?
$data = [
‘name’ => $productTitle,
‘slug’ => $productTitle,
];
$result = $woocommerce->put(‘products/’ . $productId, $data);