WordPress at Your Fingertips
function is not described

WC_Product_Variable_Data_Store_CPT::read_product_data() protected WC 3.0.0

Read product data.

{} It's a method of the class: WC_Product_Variable_Data_Store_CPT{}

No Hooks.

Return

null. Nothing.

Usage

// protected - for code of main (parent) or child class
$result = $this->read_product_data( $product );
$product(WC_Product) (required) (passed by reference — &)
Product object.

Changelog

Since 3.0.0 Introduced.

Code of WC_Product_Variable_Data_Store_CPT::read_product_data() WC 5.8.0

protected function read_product_data( &$product ) {
	parent::read_product_data( $product );

	// Make sure data which does not apply to variables is unset.
	$product->set_regular_price( '' );
	$product->set_sale_price( '' );
}