Automattic\WooCommerce\Internal\ProductAttributesLookup

DataRegenerator::initiate_regeneration()publicWC 1.0

Initialize the regeneration procedure: deletes the lookup table and related options if they exist, then it creates the table and runs the first step of the regeneration process.

This method is intended ONLY to be used as a callback for a db update in wc-update-functions, regeneration triggered from the tools page will use initiate_regeneration_from_tools_page instead.

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

Хуков нет.

Возвращает

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

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

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

Код DataRegenerator::initiate_regeneration() WC 8.7.0

public function initiate_regeneration() {
	$this->data_store->unset_regeneration_aborted_flag();
	$this->enable_or_disable_lookup_table_usage( false );

	$this->delete_all_attributes_lookup_data();
	$products_exist = $this->initialize_table_and_data();
	if ( $products_exist ) {
		$this->enqueue_regeneration_step_run();
	} else {
		$this->finalize_regeneration( true );
	}
}