Automattic\WooCommerce\Internal\ProductAttributesLookup

DataRegenerator::abort_regeneration_from_tools_page()publicWC 1.0

Метод класса: DataRegenerator{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

$DataRegenerator = new DataRegenerator();
$DataRegenerator->;

Код DataRegenerator::abort_regeneration_from_tools_page() WC 9.2.3

}

/**
 * Enable or disable the actual lookup table usage.
 *
 * @param bool $enable True to enable, false to disable.
 * @throws \Exception A lookup table regeneration is currently in progress.
 */
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' );
}

/**
 * Check if everything is good to go to perform a complete or per product lookup table data regeneration
 * and throw an exception if not.