WordPress at Your Fingertips
function is not described

Automattic\WooCommerce\Internal\ProductAttributesLookup

DataRegenerator::enable_or_disable_lookup_table_usage() private WC 1.0

Enable or disable the actual lookup table usage.

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

No Hooks.

Return

null. Nothing.

Usage

// private - for code of main (parent) class only
$result = $this->enable_or_disable_lookup_table_usage( $enable );
$enable(true|false) (required)
True to enable, false to disable.

Code of DataRegenerator::enable_or_disable_lookup_table_usage() WC 5.9.0

private function enable_or_disable_lookup_table_usage( $enable ) {
	if ( $this->data_store->regeneration_is_in_progress() ) {
		throw new \Exception( "Can't enable or disable the attributes lookup table usage while it's regenerating." );
	}

	update_option( 'woocommerce_attribute_lookup_enabled', $enable ? 'yes' : 'no' );
}