I'm trying to add custom attributes to a checkout but I'm getting this error, "Field is not defined on AttributeInput". Where do I define this attribute?
Here's what my code looks like:
const input = {
customAttributes: [
{
is_third_party: false,
delivery_window: '',
delivery_date: '',
},
],
};
client.checkout.create(input).then(checkout => {
setCookie('cart', checkout.id, { path: '/' });
dispatch({
contextData: {
...contextData,
checkoutId: checkout.id,
},
type: 'set',
});
});
const input = {
customAttributes: [
{
'key': 'is_third_party',
'value': false,
},
{
'key': 'delivery_window',
'value': '',
},
{
'key': 'delivery_date',
'value': '',
},
],
};
Please refer https://www.npmjs.com/package/shopify-buy
User | Count |
---|---|
13 | |
12 | |
7 | |
4 | |
4 |