updateCategory - Product Module Reference
BetaThis documentation provides a reference to the updateCategory method. This belongs to the Product Module.
This method is used to update a product category by its ID.
Example
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function updateCategory (id: string, name: string) {
const productModule = await initializeProductModule()
const category = await productModule.updateCategory(id, {
name,
})
// do something with the product category or return it
}
Parameters
categoryId
stringRequiredThe ID of the product category to update.
The attributes to update in th product category.
Returns
The updated product category.
Was this section helpful?