PHP Interface WC_Product_Variable_Data_Store_Interface

Functions that must be defined by product variable store classes.
Author: WooThemes
Show file Open project: woocommerce/woocommerce

Public Methods

Method Description
child_has_dimensions ( $product ) : boolean Does a child have dimensions set?
child_has_weight ( $product ) : boolean Does a child have a weight set?
child_is_in_stock ( $product ) : boolean Is a child in stock?
sync_managed_variation_stock_status ( &$product ) Stock managed at the parent level - update children being managed by this product.
sync_price ( WC_Product | integer &$product ) Sync variable product prices with children.

Method Details

child_has_dimensions() public method

Does a child have dimensions set?
public child_has_dimensions ( $product ) : boolean
return boolean

child_has_weight() public method

Does a child have a weight set?
public child_has_weight ( $product ) : boolean
return boolean

child_is_in_stock() public method

Is a child in stock?
public child_is_in_stock ( $product ) : boolean
return boolean

sync_managed_variation_stock_status() public method

This sync function syncs downwards (from parent to child) when the variable product is saved.

sync_price() public method

Sync variable product prices with children.
public sync_price ( WC_Product | integer &$product )
$product WC_Product | integer