Initial commit
This commit is contained in:
13
api/hooks/product/put_update.js
Normal file
13
api/hooks/product/put_update.js
Normal file
@@ -0,0 +1,13 @@
|
||||
const { extractSizingChart } = require("../lib/printfulRestAPI")
|
||||
let { clearSSRCache } = require("../lib/utils")
|
||||
|
||||
;(function () {
|
||||
clearSSRCache()
|
||||
if (context.data.printfulProductId) {
|
||||
const sizingChart = extractSizingChart(context.data.printfulProductId, context.data.id)
|
||||
if (sizingChart) {
|
||||
context.data.sizingChart = sizingChart
|
||||
return { data: context.data }
|
||||
}
|
||||
}
|
||||
})()
|
||||
Reference in New Issue
Block a user