Product Tags


Overview

The product tags API allows you to create, view, update, and delete individual product tags.


List all product tags

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

getProductTags()

Parameters

    String? context,
    int? page,
    int? perPage,
    String? search,
    List<int>? exclude,
    List<int>? include,
    int? offset,
    String? order,
    String? orderBy,
    bool? hideEmpty,
    int? product,
    String? slug

API Call

// Initialize WooSignal
await WooSignal.instance.init(appKey: "your app key");

// Call API
List<ProductTag> productTags = await WooSignal.instance.getProductTags();

Response

List<ProductTag> instance

Represents the following object - WooCommerce list all product tags


Retrieve a product tag

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

retrieveProductTag({id:"product id"})

Parameters

    int id

API Call

// Initialize WooSignal
await WooSignal.instance.init(appKey: "your app key");

// Call API
ProductTag productTag = await WooSignal.instance.retrieveProductTag(id: "product id");

Response

ProductTag instance

Represents the following object - WooCommerce retrieve a product tag


Delete a product tag

This API helps you delete a product tag.

deleteProductTag(int id, {bool force = true})

Parameters

int id, 
{bool force = true}

API Call

// Initialize WooSignal
await WooSignal.instance.init(appKey: "your app key");

// Call API
ProductTag productTag = await WooSignal.instance.deleteProductTag(id: "product id");

Response

ProductTag instance

Represents the following object - WooCommerce product tag


Update a product

This API lets you make changes to a product tag.

updateProductTag(int id, { data })

Parameters

int id, 
{Map<String, dynamic> data}

API Call

// Initialize WooSignal
await WooSignal.instance.init(appKey: "your app key");

// Call API
ProductTag productTag = await WooSignal.instance.updateProductTag(id: "product id");

Response

ProductTag instance

Represents the following object - WooCommerce product tag


Create a product tag

This API helps you to create a new product tag.

createProductTag({})

Parameters

required String name,
required String? slug,
required String? description

API Call

// Initialize WooSignal
await WooSignal.instance.init(appKey: "your app key");

// Call API
ProductTag product = await WooSignal.instance.createProductTag({
    required String name,
    String? slug,
    String? description
    });

Response

ProductTag instance

Represents the following object - WooCommerce product