Product Reviews


Overview

The product reviews API allows you to view individual or a batch of products.


Create a product review

This API helps you to create a new product review.

createProductReview({})

Parameters

int productId,
int status,
String reviewer,
String reviewerEmail,
String review,
int rating,
bool verified

API Call

// CONFIG FOR WOOSIGNAL
var wsConfig = {
"appKey":"your app key",
"debugMode":true
};

// CREATING AN INSTANCE
WooSignal.getInstance(config: wsConfig).then( (wcStore) {
    wcStore.createProductReview({
    int productId,
    int status,
    String reviewer,
    String reviewerEmail,
    String review,
    int rating,
    bool verified}).then((productReview){
        print(productReview.toJson());
    });
});

Response

ProductReview instance

Represents the following object - WooCommerce create a product review


Create a product review

This API helps you to create a new product review.

createProductReview({})

Parameters

int productId,
int status,
String reviewer,
String reviewerEmail,
String review,
int rating,
bool verified

List all product Reviews

Returns product reviews back from WooCommerce, include parameters to query data.

getProductReviews()

Parameters

int page,
int perPage,
String search,
String after,
String before,
List<int> exclude,
List<int> include,
int offset,
String order,
String orderBy,
List<int> reviewer,
List<int> reviewerExclude,
List<String> reviewerEmail,
List<int> product,
String status

API Call

// CONFIG FOR WOOSIGNAL
var wsConfig = {
"appKey":"your app key",
"debugMode":true
};

// CREATING AN INSTANCE
WooSignal.getInstance(config: wsConfig).then( (wcStore) {

    wcStore.getProductReviews().then( (productReviews) {
        print(productReviews.toString());
    });

});

Response

List<ProductReview> instance

Represents the following object - WooCommerce list all product reviews