getProductById method
Returns a WooProduct, with the specified id
.
Implementation
Future<WooProduct> getProductById({required int id}) async {
WooProduct product;
_setApiResourceUrl(
path: 'products/' + id.toString(),
);
final response = await get(queryUri.toString());
product = WooProduct.fromJson(response);
return product;
}