Свойство | Тип | Описание | |
---|---|---|---|
$extra_data | array | Stores product data. |
Метод | Описание | |
---|---|---|
__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 | ||
Результат | string |
public get_children ( string $context = 'view' ) : array | ||
$context | string | |
Результат | array |
public get_price_html ( string $price = '' ) : string | ||
$price | string | (default: '') |
Результат | string |
public is_on_sale ( ) : boolean | ||
Результат | boolean |
public is_purchasable ( ) : boolean | ||
Результат | boolean |
public set_children ( array $children ) | ||
$children | array |