getProductCategoryById method
Returns a WooProductCategory, with the specified categoryId
.
Implementation
Future<WooProductCategory> getProductCategoryById(
{required int categoryId}) async {
WooProductCategory productCategory;
_setApiResourceUrl(
path: 'products/categories/' + categoryId.toString(),
);
final response = await get(queryUri.toString());
_printToLog('response gotten : ' + response.toString());
productCategory = WooProductCategory.fromJson(response);
return productCategory;
}