WordPress at Your Fingertips
function is not described

Automattic\WooCommerce\Internal\ProductAttributesLookup

DataRegenerator::initiate_regeneration_from_tools_page() private WC 1.0

Callback to initiate the regeneration process from the Status - Tools page.

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

No Hooks.

Return

null. Nothing.

Usage

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

Code of DataRegenerator::initiate_regeneration_from_tools_page() WC 5.9.0

private function initiate_regeneration_from_tools_page() {
	// phpcs:ignore WordPress.Security.ValidatedSanitizedInput
	if ( ! isset( $_REQUEST['_wpnonce'] ) || false === wp_verify_nonce( $_REQUEST['_wpnonce'], 'debug_action' ) ) {
		throw new \Exception( 'Invalid nonce' );
	}

	if ( isset( $_REQUEST['regenerate_product_attribute_lookup_data_product_id'] ) ) {
		$product_id = (int) $_REQUEST['regenerate_product_attribute_lookup_data_product_id'];
		$this->check_can_do_lookup_table_regeneration( $product_id );
		$this->data_store->create_data_for_product( $product_id );
	} else {
		$this->check_can_do_lookup_table_regeneration();
		$this->initiate_regeneration();
	}
}