ChemPare Documentation - v0.0.0
    Preparing search index...

    Interface WooCommerceSearchResponseItem

    Represents a product item from the WooCommerce API search response

    interface WooCommerceSearchResponseItem {
        id: number;
        name: string;
        type: string;
        description: string;
        short_description: string;
        permalink: string;
        is_in_stock: boolean;
        sold_individually: boolean;
        sku: string;
        prices: {
            price: string;
            regular_price: string;
            sale_price: string;
            currency_code: string;
            currency_symbol: string;
            currency_minor_unit: number;
            currency_decimal_separator: string;
            currency_thousand_separator: string;
            currency_prefix: string;
            currency_suffix: string;
        };
        categories?: { id: number; name: string; slug: string; link: string }[];
        attributes: {
            id: number;
            name: string;
            taxonomy: string;
            has_variations: boolean;
            terms: { id: number; name: string; slug: string }[];
        }[];
        variations: { id: number; attributes: { name: string; value: string }[] }[];
        add_to_cart?: { text?: string; description?: string; url?: string };
        tags?: string[];
    }

    Hierarchy (View Summary)

    Index

    Properties

    id: number

    Unique identifier for the product

    name: string

    Name of the product

    type: string

    Type of product (e.g., 'simple', 'variable', 'grouped')

    description: string

    Full HTML description of the product

    short_description: string

    Brief HTML description of the product

    permalink: string

    URL to the product's page on the store

    is_in_stock: boolean

    Whether the product is currently in stock

    sold_individually: boolean

    Whether the product can only be bought one at a time

    sku: string

    Stock keeping unit - unique product identifier

    prices: {
        price: string;
        regular_price: string;
        sale_price: string;
        currency_code: string;
        currency_symbol: string;
        currency_minor_unit: number;
        currency_decimal_separator: string;
        currency_thousand_separator: string;
        currency_prefix: string;
        currency_suffix: string;
    }

    Detailed pricing information for the product

    Type declaration

    • price: string

      Current price of the product

    • regular_price: string

      Regular price before any sales

    • sale_price: string

      Sale price if the product is on sale

    • currency_code: string

      ISO currency code (e.g., 'USD', 'EUR')

    • currency_symbol: string

      Currency symbol (e.g., '$', '€')

    • currency_minor_unit: number

      Number of decimal places for the currency

    • currency_decimal_separator: string

      Character used as decimal separator

    • currency_thousand_separator: string

      Character used as thousands separator

    • currency_prefix: string

      Text to display before the price

    • currency_suffix: string

      Text to display after the price

    categories?: { id: number; name: string; slug: string; link: string }[]

    Categories the product belongs to

    Type declaration

    • id: number

      Unique identifier for the category

    • name: string

      Display name of the category

    • slug: string

      URL-friendly version of the category name

    • link: string

      URL to the category page

    attributes: {
        id: number;
        name: string;
        taxonomy: string;
        has_variations: boolean;
        terms: { id: number; name: string; slug: string }[];
    }[]

    Product attributes and their possible values

    Type declaration

    • id: number

      Unique identifier for the attribute

    • name: string

      Display name of the attribute

    • taxonomy: string

      Taxonomy identifier for the attribute

    • has_variations: boolean

      Whether this attribute is used for product variations

    • terms: { id: number; name: string; slug: string }[]

      Possible values for this attribute

    variations: { id: number; attributes: { name: string; value: string }[] }[]

    Product variations if this is a variable product

    Type declaration

    • id: number

      Unique identifier for the variation

    • attributes: { name: string; value: string }[]

      Attributes that define this variation

    add_to_cart?: { text?: string; description?: string; url?: string }

    Add to cart button configuration

    Type declaration

    • Optionaltext?: string

      Button text

    • Optionaldescription?: string

      Button description

    • Optionalurl?: string

      URL to add the product to cart

    tags?: string[]

    Array of tag names associated with the product