WordPress at Your Fingertips
function is not described


DataRegenerator::initiate_regeneration() public WC 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 is the method that should be used as a callback for a data regeneration in wc-update-functions, e.g.:

function wc_update_XX_regenerate_product_attributes_lookup_table() { wc_get_container()->get(DataRegenerator::class)->initiate_regeneration(); return false; }

(Note how we are returning "false" since the class handles the step scheduling by itself).

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

No Hooks.


null. Nothing.


$DataRegenerator = new DataRegenerator();

Code of DataRegenerator::initiate_regeneration() WC 5.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 {