When I create the attribute for the product from the API Woocommerce , the attribute does not appear on the page of my site WordPress, so I have to refresh the publication for the product manually please any help?
First If you have attributes already created in attributes section Woocommerce.You can update by this PUT:- http:/example.com/wp-json/wc/v3/products/123 BODY:
{ "attributes": [ { "id": 4, //Example: color's ID "options": "white" } ] }
If attributes are not present in the attributes section, please create the attributes and assign to the products.You can create attributes in this way. POST:- /wp-json/wc/v3/products/attributes
BODY:
{ "name": "Color", "slug": "pa_color", "type": "select", "order_by": "menu_order", "has_archives": true }