PHP 클래스 WC_Product_Variable_Data_Store_CPT

저자: WooThemes
상속: extends WC_Product_Data_Store_CPT, implements WC_Object_Data_Store_Interface, implements WC_Product_Variable_Data_Store_Interface
파일 보기 프로젝트 열기: woocommerce/woocommerce

공개 메소드들

메소드 설명
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?
read_children ( &$product, boolean $force_read = false ) : WC_Product Loads variation child IDs.
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.
sync_stock_status ( WC_Product | integer &$product ) Sync variable product stock status with children.

보호된 메소드들

메소드 설명
read_product_data ( &$product ) Read product data.

비공개 메소드들

메소드 설명
read_price_data ( &$product, boolean $include_taxes = false ) Get an array of all sale and regular prices from all variations. This is used for example when displaying the price range at variable product level or seeing if the variable product is on sale.
read_variation_attributes ( &$product ) Loads an array of attributes used for variations, as well as their possible values.

메소드 상세

child_has_dimensions() 공개 메소드

Does a child have dimensions set?
부터: 2.7.0
public child_has_dimensions ( $product ) : boolean
리턴 boolean

child_has_weight() 공개 메소드

Does a child have a weight set?
부터: 2.7.0
public child_has_weight ( $product ) : boolean
리턴 boolean

child_is_in_stock() 공개 메소드

Is a child in stock?
부터: 2.7.0
public child_is_in_stock ( $product ) : boolean
리턴 boolean

read_children() 공개 메소드

Loads variation child IDs.
public read_children ( &$product, boolean $force_read = false ) : WC_Product
$force_read boolean True to bypass the transient.
리턴 WC_Product

read_product_data() 보호된 메소드

Read product data.
부터: 2.7.0
protected read_product_data ( &$product )

sync_managed_variation_stock_status() 공개 메소드

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

sync_price() 공개 메소드

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

sync_stock_status() 공개 메소드

Change does not persist unless saved by caller.
부터: 2.7.0
public sync_stock_status ( WC_Product | integer &$product )
$product WC_Product | integer