fix(medusa): product variant metadata (#98)
fix(medusa-plugin-sendgrid): generic email support
This commit is contained in:
1 parent
e24d180ea3
commit
520115a2ce
5 files changed
+51
-42
No files matched your search
@@ -71,6 +71,18 @@ export default async (req, res) => {
|
||||
delete value.prices
|
||||
delete value.options
|
||||
|
||||
if (!_.isEmpty(value.metadata)) {
|
||||
for (let key of Object.keys(value.metadata)) {
|
||||
await productVariantService.setMetadata(
|
||||
variant_id,
|
||||
key,
|
||||
value.metadata[key]
|
||||
)
|
||||
}
|
||||
|
||||
delete value.metadata
|
||||
}
|
||||
|
||||
if (!_.isEmpty(value)) {
|
||||
await productVariantService.update(variant_id, value)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user