updateCollections - Product Module Reference
BetaThis documentation provides a reference to the updateCollections method. This belongs to the Product Module.
This method is used to update existing product collections.
Example
import {
initialize as initializeProductModule,
} from "@medusajs/product"
async function updateCollection (id: string, title: string) {
const productModule = await initializeProductModule()
const collections = await productModule.updateCollections([
{
id,
title
}
])
// do something with the product collections or return them
}
Parameters
The product collections to be updated, each holding the attributes that should be updated in the product collection.
sharedContext
ContextA context used to share resources, such as transaction manager, between the application and the module.
sharedContext
ContextReturns
The list of updated product collections.
Was this section helpful?