Class WC_Product_Variation
Product Variation Class
The WooCommerce product variation class handles product variation data.
- WC_Product
- WC_Product_Variation
Category: Class
Author: WooThemes
Version: 2.1.0
Class: WC_Product_Variation
Located at includes/class-wc-product-variation.php
Methods summary
public
|
#
__construct( integer $variation, array $args = array() )
Loads all product data from custom fields |
public
boolean
|
|
public
string
|
|
public
string
|
|
public
string
|
|
public
boolean
|
#
variation_is_visible( )
Checks if this particular variation is visible (variations with no price, or out of stock, can be hidden) |
public
boolean
|
|
public
boolean
|
|
public
integer
|
|
public
array
|
|
public
string
|
#
get_price_html( string $price = '' )
Get variation price HTML. Prices are not inherited from parents. |
public
integer
|
|
public
string
|
|
public
integer
|
|
public
integer
|
|
public
integer
|
|
public
string
|
#
get_shipping_class( )
Get the shipping class, and if not set, get the shipping class of the parent. |
public
integer
|
|
public
string
|
#
get_formatted_name( )
Get product name with extra details such as SKU, price and attributes. Used within admin. |
Methods inherited from WC_Product
__get()
,
__isset()
,
adjust_price()
,
backorders_allowed()
,
backorders_require_notification()
,
enable_dimensions_display()
,
get_attribute()
,
get_attributes()
,
get_availability()
,
get_average_rating()
,
get_categories()
,
get_children()
,
get_cross_sells()
,
get_dimensions()
,
get_file()
,
get_file_download_path()
,
get_files()
,
get_gallery_attachment_ids()
,
get_parent()
,
get_post_data()
,
get_price()
,
get_price_excluding_tax()
,
get_price_html_from_text()
,
get_price_html_from_to()
,
get_price_including_tax()
,
get_price_suffix()
,
get_rating_count()
,
get_rating_html()
,
get_regular_price()
,
get_related()
,
get_sale_price()
,
get_sku()
,
get_stock_quantity()
,
get_tags()
,
get_tax_class()
,
get_tax_status()
,
get_title()
,
get_total_stock()
,
get_upsells()
,
get_weight()
,
has_attributes()
,
has_child()
,
has_dimensions()
,
has_enough_stock()
,
has_file()
,
has_weight()
,
is_downloadable()
,
is_featured()
,
is_in_stock()
,
is_on_backorder()
,
is_on_sale()
,
is_shipping_taxable()
,
is_sold_individually()
,
is_taxable()
,
is_type()
,
is_virtual()
,
is_visible()
,
list_attributes()
,
managing_stock()
,
needs_shipping()
,
set_price()
,
set_stock_status()
,
single_add_to_cart_text()
Magic methods summary
Properties summary
public
mixed
|
$variation_id | |
public
mixed
|
$parent | |
public
array
|
$variation_data | |
public
boolean
|
$variation_has_length | |
public
boolean
|
$variation_has_width | |
public
boolean
|
$variation_has_height | |
public
boolean
|
$variation_has_weight | |
public
boolean
|
$variation_has_stock | |
public
boolean
|
$variation_has_sku | |
public
boolean
|
$variation_shipping_class | |
public
boolean
|
$variation_shipping_class_id | |
public
boolean
|
$variation_has_tax_class | |
public
boolean
|
$variation_has_downloadable_files |