Automattic\WooCommerce\Internal\ProductAttributesLookup

DataRegenerator::resume_regeneration_from_tools_page()privateWC 1.0

Callback to resume the regeneration process from the Status - Tools page.

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

No Hooks.

Return

null. Nothing.

Usage

// private - for code of main (parent) class only
$result = $this->resume_regeneration_from_tools_page();

Code of DataRegenerator::resume_regeneration_from_tools_page() WC 7.1.0

private function resume_regeneration_from_tools_page() {
	$this->verify_tool_execution_nonce();

	if ( ! $this->data_store->check_lookup_table_exists() ) {
		throw new \Exception( "Can't resume the product attribute lookup data regeneration process: lookup table doesn't exist" );
	}
	if ( $this->data_store->regeneration_is_in_progress() ) {
		throw new \Exception( "Can't resume the product attribute lookup data regeneration process: regeneration is already in progress" );
	}

	$this->data_store->unset_regeneration_aborted_flag();
	$this->data_store->set_regeneration_in_progress_flag();
	$this->enqueue_regeneration_step_run();
}