Class WC_Product_Grouped

Grouped Product Class

Grouped products cannot be purchased - they are wrappers for other products.

WC_Product
Extended by WC_Product_Grouped
Package: WooCommerce\Classes\Products
Category: Class
Author: WooThemes
Version: 2.0.0
Class: WC_Product_Grouped
Located at includes/class-wc-product-grouped.php

Methods summary

public
# __construct( mixed $product )

__construct function.

__construct function.

Parameters

$product
mixed
$product

Overrides

WC_Product::__construct
public string
# add_to_cart_text( )

Get the add to cart button text

Get the add to cart button text

Returns

string

Overrides

WC_Product::add_to_cart_text
public integer
# get_total_stock( )

Get total stock.

Get total stock.

This is the stock of parent and children combined.

Returns

integer

Overrides

WC_Product::get_total_stock
public array
# get_children( )

Return the products children posts.

Return the products children posts.

Returns

array

Overrides

WC_Product::get_children
public object
# get_child( mixed $child_id )

get_child function.

get_child function.

Parameters

$child_id
mixed
$child_id

Returns

object
WC_Product or WC_Product_variation
public boolean
# has_child( )

Returns whether or not the product has any child product.

Returns whether or not the product has any child product.

Returns

boolean

Overrides

WC_Product::has_child
public boolean
# is_on_sale( )

Returns whether or not the product is on sale.

Returns whether or not the product is on sale.

Returns

boolean

Overrides

WC_Product::is_on_sale
public boolean
# is_purchasable( )

Returns false if the product cannot be bought.

Returns false if the product cannot be bought.

Returns

boolean

Overrides

WC_Product::is_purchasable
public string
# get_price_html( string $price = '' )

Returns the price in html format.

Returns the price in html format.

Parameters

$price
string
$price (default: '')

Returns

string

Overrides

WC_Product::get_price_html

Methods inherited from WC_Product

__get(), __isset(), add_to_cart_url(), adjust_price(), backorders_allowed(), backorders_require_notification(), enable_dimensions_display(), exists(), get_attribute(), get_attributes(), get_availability(), get_average_rating(), get_categories(), get_cross_sells(), get_dimensions(), get_file(), get_file_download_path(), get_files(), get_formatted_name(), get_gallery_attachment_ids(), get_image(), get_image_id(), get_parent(), get_permalink(), 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_shipping_class(), get_shipping_class_id(), get_sku(), get_stock_quantity(), get_tags(), get_tax_class(), get_tax_status(), get_title(), get_upsells(), get_weight(), has_attributes(), has_dimensions(), has_enough_stock(), has_file(), has_weight(), increase_stock(), is_downloadable(), is_featured(), is_in_stock(), is_on_backorder(), is_shipping_taxable(), is_sold_individually(), is_taxable(), is_type(), is_virtual(), is_visible(), list_attributes(), managing_stock(), needs_shipping(), reduce_stock(), set_price(), set_stock(), set_stock_status(), single_add_to_cart_text()

Magic methods summary

Properties summary

public mixed $children
#

Public

array Array of child products/posts/variations.
public mixed $total_stock
#

Public

string The product's total stock, including that of its children.

Properties inherited from WC_Product

$id, $post, $product_type

WooCommerce API documentation generated by ApiGen 2.8.0