Automattic\WooCommerce\Internal\ProductAttributesLookup
DataRegenerator::initiate_regeneration()
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.
Return
null
. Nothing (null).
Usage
$DataRegenerator = new DataRegenerator(); $DataRegenerator->initiate_regeneration();
DataRegenerator::initiate_regeneration() DataRegenerator::initiate regeneration code 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 ); } }