How to add attributes to WooCommerce Product?

How to add attributes to WooCommerce Product?

I need to add several attributes when creating the product using Make module

For now, I’m trying to add attributes with array [{“id”: 1, “position”: 0}] but as a result, the attributes are not added, the output is an empty array.

blueprint.json (1.0 MB)

INPUT:
[
{
“name”: “test attributes numeric position”,
“tags”: ,
“images”: ,
“metaData”: [
{
“key”: “shipping_time”,
“value”: “shipping_time”
},
{
“key”: “delivery_options”,
“value”: “delivery_options”
},
{
“key”: “features”,
“value”: “features”
},
{
“key”: “what_is_in_the_box”,
“value”: “what_is_in_the_box”
},
{
“key”: “size”,
“value”: “size”
},
{
“key”: “_iconic_wsb_product_page_order_bump_ids”,
“value”: “”
},
{
“key”: “_iconic_wsb_product_page_bump_modal_ids”,
“value”: “”
}
],
“taxStatus”: “shipping”,
“attributes”: [
{
“id”: 2,
“position”: 0
},
{
“id”: 4,
“position”: 1
}
],
“categories”: ,
“dimensions”: {},
“stock_status”: “instock”,
“catalogVisibility”: “visible”
}
]

OUTPUT:

[
{
“id”: 485,
“name”: “test attributes numeric position”,
“slug”: “test-attributes-numeric-position”,
“permalink”: “https://”,
“type”: “simple”,
“status”: “publish”,
“featured”: false,
“description”: null,
“sku”: null,
“price”: null,
“purchasable”: false,
“virtual”: false,
“downloadable”: false,
“downloads”: ,
“backorders”: “no”,
“backordered”: false,
“weight”: null,
“dimensions”: {
“length”: null,
“width”: null,
“height”: null
},
“categories”: [
{
“id”: 15,
“name”: “Uncategorized”,
“slug”: “uncategorized”
}
],
“tags”: ,
“images”: ,
“attributes”: ,
“variations”: ,
“dateCreated”: “2023-09-29T05:02:39.000Z”,
“dateModified”: “2023-09-29T05:02:39.000Z”,
“catalogVisibility”: “visible”,
“shortDescription”: null,
“regularPrice”: null,
“salePrice”: null,
“dateOnSaleFrom”: null,
“dateOnSaleTo”: null,
“onSale”: false,
“totalSales”: 0,
“downloadLimit”: -1,
“downloadExpiry”: -1,
“externalUrl”: null,
“buttonText”: null,
“taxStatus”: “shipping”,
“taxClass”: null,
“manageStock”: false,
“stockQuantity”: null,
“backordersAllowed”: false,
“lowStockAmount”: null,
“soldIndividually”: false,
“shippingRequired”: true,
“shippingTaxable”: true,
“shippingClass”: null,
“shippingClassId”: 0,
“reviewsAllowed”: true,
“averageRating”: “0”,
“ratingCount”: 0,
“upsellIds”: ,
“crossSellIds”: ,
“parentId”: 0,
“purchaseNote”: null,
“defaultAttributes”: ,
“groupedProducts”: ,
“menuOrder”: 0,
“priceHtml”: null,
“relatedIds”: [
305,
363,
284,
357,
352
],
“metaData”: [
{
“id”: 8654,
“key”: “shipping_time”,
“value”: “shipping_time”
},
{
“id”: 8655,
“key”: “delivery_options”,
“value”: “delivery_options”
},
{
“id”: 8656,
“key”: “features”,
“value”: “features”
},
{
“id”: 8657,
“key”: “what_is_in_the_box”,
“value”: “what_is_in_the_box”
},
{
“id”: 8658,
“key”: “size”,
“value”: “size”
},
{
“id”: 8659,
“key”: “_iconic_wsb_product_page_order_bump_ids”,
“value”: null
},
{
“id”: 8660,
“key”: “_iconic_wsb_product_page_bump_modal_ids”,
“value”: null
}
],
“stockStatus”: “instock”,
“hasOptions”: false,
“permalinkTemplate”: “https://”,
“generatedSlug”: “test-attributes-numeric-position”,
“galleryImages”:
}
]

Welcome to the Make community!

1.

Could you please share screenshots of the module fields and filters in question? It would really help other community members to see what you’re looking at.

2.

You can also export the scenario blueprint file to allow others to replicate the issue. At the bottom of the scenario editor, you can click on the three dots to find the Export Blueprint menu item.

Screenshot_2023-08-24_230826

Uploading it here will look like this:

blueprint.json (12.3 KB)

3.

If possible, could you also please provide the input/output bundles of the modules by running the scenario, then clicking the bubble on the top-right of each module, taking screenshots of, and copying the contents into this discussion thread:

Screenshot_2023-08-29_100800

This will allow others to better assist you. Thanks!

2 Likes

Thanks for advice, tell me if need more information.