getProductAttributes method
Returns a list of all WooProductAttribute.
Related endpoint: https://woocommerce.github.io/woocommerce-rest-api-docs/#product-attributes
Implementation
Future<List<WooProductAttribute>> getProductAttributes() async {
List<WooProductAttribute> productAttributes = [];
_setApiResourceUrl(
path: 'products/attributes',
);
final response = await get(queryUri.toString());
for (var a in response) {
var att = WooProductAttribute.fromJson(a);
_printToLog('prod gotten here : ' + att.toString());
productAttributes.add(att);
}
return productAttributes;
}