WordPress at Your Fingertips
function is not described

Automattic\WooCommerce\Internal\ProductAttributesLookup

DataRegenerator::delete_all_attributes_lookup_data() public WC 1.0

Delete all the existing data related to the lookup table, including the table itself.

Shortcut to run this method in case the debug tools UI isn't available or for quick debugging:

wp eval "wc_get_container()->get(Automattic\WooCommerce\Internal\ProductAttributesLookup\DataRegenerator::class)->delete_all_attributes_lookup_data();"

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

No Hooks.

Return

null. Nothing.

Usage

$DataRegenerator = new DataRegenerator();
$DataRegenerator->delete_all_attributes_lookup_data();

Code of DataRegenerator::delete_all_attributes_lookup_data() WC 5.9.0

public function delete_all_attributes_lookup_data() {
	global $wpdb;

	delete_option( 'woocommerce_attribute_lookup_enabled' );
	delete_option( 'woocommerce_attribute_lookup_last_product_id_to_process' );
	delete_option( 'woocommerce_attribute_lookup_last_products_page_processed' );
	$this->data_store->unset_regeneration_in_progress_flag();

	// phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
	$wpdb->query( 'DROP TABLE IF EXISTS ' . $this->lookup_table_name );
}