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.

Method of the class: DataRegenerator{}

No Hooks.


null. Nothing (null).


$DataRegenerator = new DataRegenerator();

DataRegenerator::initiate_regeneration() code WC 8.9.0

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

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