Automattic\WooCommerce\Internal\ProductAttributesLookup

LookupDataStore::create_data_for()privateWC 1.0

Create lookup table data for a given product.

Method of the class: LookupDataStore{}

No Hooks.

Return

null. Nothing (null).

Usage

// private - for code of main (parent) class only
$result = $this->create_data_for( $product );
$product(\WC_Product) (required)
The product to create the data for.

LookupDataStore::create_data_for() code WC 8.6.1

private function create_data_for( \WC_Product $product ) {
	if ( $this->is_variation( $product ) ) {
		$this->create_data_for_variation( $product );
	} elseif ( $this->is_variable_product( $product ) ) {
		$this->create_data_for_variable_product( $product );
	} else {
		$this->create_data_for_simple_product( $product );
	}
}