Automattic\WooCommerce\Internal\ProductAttributesLookup

DataRegenerator::run_regeneration_step_callback()privateWC 1.0

Action scheduler callback, performs one regeneration step and then schedules the next step if necessary.

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

No Hooks.

Return

null. Nothing.

Usage

// private - for code of main (parent) class only
$result = $this->run_regeneration_step_callback();

Code of DataRegenerator::run_regeneration_step_callback() WC 7.1.0

private 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();
	if ( $result ) {
		$this->enqueue_regeneration_step_run();
	} else {
		$this->finalize_regeneration( true );
	}
}