DataRegenerator::enable_or_disable_lookup_table_usage()privateWC 1.0

Enable or disable the actual lookup table usage.

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

No Hooks.


null. Nothing.


// 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 7.1.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' );