Skip to content

Commit 98bebc5

Browse files
chore(import-product): disable price if isnt deliberate webhook
1 parent e745552 commit 98bebc5

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

functions/lib/integration/import-product.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ module.exports = ({ appSdk, storeId, auth }, tinyToken, queueEntry, appData, can
181181
} else {
182182
return null
183183
}
184-
return parseProduct(produto, storeId, auth, method === 'POST', false, appData).then(product => {
184+
return parseProduct(produto, storeId, auth, method === 'POST', tipo, appData).then(product => {
185185
if (!isNaN(quantity)) {
186186
product.quantity = quantity >= 0 ? quantity : 0
187187
}

functions/lib/integration/parsers/product-to-ecomplus.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ module.exports = (tinyProduct, storeId, auth, isNew = true, tipo, appData) => ne
9292
body_html: tinyProduct.descricao_complementar || tinyProduct.descricaoComplementar
9393
}
9494

95-
if (appData && appData.disable_price && !isNew) {
95+
if (appData && appData.disable_price && !isNew && !isProduct) {
9696
delete product.price
9797
}
9898

0 commit comments

Comments
 (0)