Automattic\WooCommerce\Internal\ProductAttributesLookup

DataRegenerator::delete_all_attributes_lookup_data()privateWC 1.0

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

Метод класса: DataRegenerator{}

No Hooks.

Return

null. Nothing.

Usage

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

Код DataRegenerator::delete_all_attributes_lookup_data() WC 7.1.0

private 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_processed_count' );
	$this->data_store->unset_regeneration_in_progress_flag();

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