Property | Type | Description | |
---|---|---|---|
$extra_data | array | Stores product data. |
Method | Description | |
---|---|---|
__construct ( integer | WC_Product | object $product ) | Merges grouped product data into the parent object. | |
add_to_cart_text ( ) : string | Get the add to cart button text. | |
get_children ( string $context = 'view' ) : array | Return the children of this product. | |
get_price_html ( string $price = '' ) : string | Returns the price in html format. | |
get_type ( ) : string | Get internal type. | |
is_on_sale ( ) : boolean | Returns whether or not the product is on sale. | |
is_purchasable ( ) : boolean | Returns false if the product cannot be bought. | |
set_children ( array $children ) | Return the children of this product. | |
sync ( WC_Product | integer $product, boolean $save = true ) : WC_Product | Sync a grouped product with it's children. These sync functions sync upwards (from child to parent) when the variation is saved. |
public __construct ( integer | WC_Product | object $product ) | ||
$product | integer | WC_Product | object | Product to init. |
public add_to_cart_text ( ) : string | ||
return | string |
public get_children ( string $context = 'view' ) : array | ||
$context | string | |
return | array |
public get_price_html ( string $price = '' ) : string | ||
$price | string | (default: '') |
return | string |
public is_on_sale ( ) : boolean | ||
return | boolean |
public is_purchasable ( ) : boolean | ||
return | boolean |
public set_children ( array $children ) | ||
$children | array |