Automattic\WooCommerce\Internal\ProductAttributesLookup
DataRegenerator::run_regeneration_step_callback
Action scheduler callback, performs one regeneration step and then schedules the next step if necessary.
Method of the class: DataRegenerator{}
No Hooks.
Returns
null. Nothing (null).
Usage
$DataRegenerator = new DataRegenerator(); $DataRegenerator->run_regeneration_step_callback();
DataRegenerator::run_regeneration_step_callback() DataRegenerator::run regeneration step callback code WC 10.5.0
public function run_regeneration_step_callback() {
if ( ! $this->data_store->regeneration_is_in_progress() ) {
// No regeneration in progress at this point means that the regeneration process
// was manually aborted via deleting the 'woocommerce_attribute_lookup_regeneration_in_progress' option.
$this->data_store->set_regeneration_aborted_flag();
$this->finalize_regeneration( false );
return;
}
$result = $this->do_regeneration_step( null, $this->data_store->optimized_data_access_is_enabled() );
if ( $result ) {
$this->enqueue_regeneration_step_run();
} else {
$this->finalize_regeneration( true );
}
}