Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 59525

REST API and permalinks

$
0
0

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);


Viewing all articles
Browse latest Browse all 59525

Trending Articles