WooProduct class
Constructors
-
WooProduct({int? id, String? name, String? slug, String? permalink, DateTime? dateCreated, DateTime? dateCreatedGmt, DateTime? dateModified, DateTime? dateModifiedGmt, WooProductType? type, WooProductStatus? status, bool? featured, WooProductCatalogVisibility? catalogVisibility, String? description, String? shortDescription, String? sku, String? price, String? regularPrice, String? salePrice, DateTime? dateOnSaleFrom, DateTime? dateOnSaleFromGmt, DateTime? dateOnSaleTo, DateTime? dateOnSaleToGmt, String? priceHtml, bool? onSale, bool? purchasable, bool? virtual, bool? downloadable, List<WooProductDownload>? downloads, int? downloadLimit, int? downloadExpiry, String? externalUrl, String? buttonText, WooProductTaxStatus? taxStatus, String? taxClass, bool? manageStock, int? stockQuantity, WooProductStockStatus? stockStatus, WooProductBackorder? backorders, bool? backordersAllowed, bool? backordered, bool? soldIndividually, String? weight, WooProductDimension? dimensions, bool? shippingRequired, bool? shippingTaxable, String? shippingClass, int? shippingClassId, bool? reviewsAllowed, String? averageRating, int? ratingCount, List<int>? relatedIds, List<int>? upsellIds, List<int>? crossSellIds, int? parentId, String? purchaseNote, List<WooProductCategory>? categories, List<WooProductItemTag>? tags, List<WooProductImage>? images, List<WooProductItemAttribute>? attributes, List<WooProductItemAttribute>? defaultAttributes, List<int>? variations, List<int>? groupedProducts, List<WooMetaData>? metaData, List<Alergen>? alergeny, List<FreeProduct>? freeProducts, int? bonuses, Map<DayOfWeek, DaySchedule>? daySchedules})
-
-
WooProduct.fromJson(Map<String, dynamic> json)
-
factory
Properties
-
alergeny
→ List<Alergen>?
-
Allergens
final
-
attributes
→ List<WooProductItemAttribute>?
-
List of attributes.
final
-
averageRating
→ String?
-
Reviews average rating.
final
-
backordered
→ bool?
-
Shows if the product is on backordered.
final
-
backorders
→ WooProductBackorder?
-
If managing stock, this controls if backorders are allowed. Options: no, notify and yes. Default is no.
final
-
backordersAllowed
→ bool?
-
Shows if backorders are allowed.
final
-
bonuses
→ int?
-
final
-
buttonText
→ String?
-
Product external button text. Only for external products.
final
-
catalogVisibility
→ WooProductCatalogVisibility?
-
Catalog visibility. Options: visible, catalog, search and hidden. Default is visible.
final
-
categories
→ List<WooProductCategory>?
-
List of categories.
final
-
crossSellIds
→ List<int>?
-
List of cross-sell products IDs.
final
-
dateCreated
↔ DateTime?
-
The date the variation was created, in the site's timezone.
getter/setter pair
-
dateCreatedGmt
↔ DateTime?
-
The date the variation was created, as GMT.
getter/setter pair
-
dateModified
↔ DateTime?
-
The date the variation was last modified, in the site's timezone.
getter/setter pair
-
dateModifiedGmt
↔ DateTime?
-
The date the variation was last modified, as GMT.
getter/setter pair
-
dateOnSaleFrom
↔ DateTime?
-
Start date of sale price, in the site's timezone.
getter/setter pair
-
dateOnSaleFromGmt
↔ DateTime?
-
Start date of sale price, as GMT.
getter/setter pair
-
dateOnSaleTo
↔ DateTime?
-
End date of sale price, in the site's timezone.
getter/setter pair
-
dateOnSaleToGmt
↔ DateTime?
-
End date of sale price, as GMT.
getter/setter pair
-
daySchedules
→ Map<DayOfWeek, DaySchedule>?
-
final
-
defaultAttributes
→ List<WooProductItemAttribute>?
-
Defaults variation attributes.
final
-
description
→ String?
-
Product description.
final
-
dimensions
→ WooProductDimension?
-
Product dimensions.
final
-
downloadable
→ bool?
-
If the product is downloadable. Default is false.
final
-
downloadExpiry
→ int?
-
Number of days until access to downloadable files expires. Default is -1.
final
-
downloadLimit
→ int?
-
Number of times downloadable files can be downloaded after purchase. Default is -1.
final
-
downloads
→ List<WooProductDownload>?
-
List of downloadable files.
final
-
externalUrl
→ String?
-
Product external URL. Only for external products.
final
-
featured
→ bool?
-
Featured product. Default is false.
final
-
freeProducts
→ List<FreeProduct>?
-
final
-
groupedProducts
→ List<int>?
-
List of grouped products ID.
final
-
hashCode
→ int
-
The hash code for this object.
no setteroverride
-
hasSchedule
→ bool
-
no setter
-
id
→ int?
-
Unique identifier for the resource.
final
-
images
→ List<WooProductImage>?
-
List of images.
final
-
manageStock
→ bool?
-
Stock management at product level. Default is false.
final
-
Menu order, used to custom sort products.
final
-
metaData
→ List<WooMetaData>?
-
Meta data.
final
-
name
→ String?
-
Product name.
final
-
onSale
→ bool?
-
Shows if the product is on sale.
final
-
parentId
→ int?
-
Product parent ID.
final
-
permalink
→ String?
-
Product URL.
final
-
price
→ String?
-
Current product price.
final
-
priceHtml
→ String?
-
Price formatted in HTML.
final
-
purchasable
→ bool?
-
Shows if the product can be bought.
final
-
purchaseNote
→ String?
-
Optional note to send the customer after purchase.
final
-
ratingCount
→ int?
-
Amount of reviews that the product has.
final
-
regularPrice
→ String?
-
Product regular price.
final
-
relatedIds
→ List<int>?
-
List of related products IDs.
final
-
reviewsAllowed
→ bool?
-
Allow reviews. Default is true.
final
-
runtimeType
→ Type
-
A representation of the runtime type of the object.
no setterinherited
-
salePrice
→ String?
-
Product sale price.
final
-
shippingClass
→ String?
-
Shipping class slug.
final
-
shippingClassId
→ int?
-
Shipping class ID.
final
-
shippingRequired
→ bool?
-
Shows if the product need to be shipped.
final
-
shippingTaxable
→ bool?
-
Shows if the product shipping is taxable.
final
-
shortDescription
→ String?
-
Product short description.
final
-
sku
→ String?
-
Unique identifier.
final
-
slug
→ String?
-
Product slug.
final
-
soldIndividually
→ bool?
-
Allow one item to be bought in a single order. Default is false.
final
-
status
→ WooProductStatus?
-
Product status (post status). Options: draft, pending, private and publish. Default is publish.
final
-
stockQuantity
→ int?
-
Stock quantity.
final
-
stockStatus
→ WooProductStockStatus?
-
Controls the stock status of the product. Options: instock, outofstock, onbackorder. Default is instock.
final
-
tags
→ List<WooProductItemTag>?
-
List of tags.
final
-
taxClass
→ String?
-
Tax class.
final
-
taxStatus
→ WooProductTaxStatus?
-
Tax status. Options: taxable, shipping and none. Default is taxable.
final
-
type
→ WooProductType?
-
Product type. Options: simple, grouped, external and variable. Default is simple.
final
-
upsellIds
→ List<int>?
-
List of up-sell products IDs.
final
-
variations
→ List<int>?
-
List of variations IDs.
final
-
virtual
→ bool?
-
Amount of sales.
If the product is virtual. Default is false.
final
-
weight
→ String?
-
Product weight.
final