Skip to content

Commit 969333c

Browse files
authored
ignore updateinfo product when extracting products from payload
1 parent 60954d3 commit 969333c

File tree

1 file changed

+2
-1
lines changed
  • src/functions/datastore-integration-webflow

1 file changed

+2
-1
lines changed

src/functions/datastore-integration-webflow/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ function customOptions() {
2222
skip: {
2323
inventory: (config.datastore.skipValidation.inventory || '').split(',').map(e => e.trim()).filter(e => !!e) || [],
2424
price: (config.datastore.skipValidation.price || '').split(',').map(e => e.trim()).filter(e => !!e) || [],
25+
updateinfo: config.datastore.skipValidation.updateinfo || 'Update Your Customer Information',
2526
},
2627
webflow: {
2728
limit: 100,
@@ -191,7 +192,7 @@ function createCache() {
191192
function extractItems(body) {
192193
const objBody = JSON.parse(body);
193194
if (objBody && objBody._embedded && objBody._embedded['fx:items']) {
194-
return objBody._embedded['fx:items'];
195+
return objBody._embedded['fx:items'].filter(item => item.name !== customOptions().skip.updateinfo);
195196
}
196197
return [];
197198
}

0 commit comments

Comments
 (0)