Automattic\WooCommerce\Internal\ProductAttributesLookup
DataRegenerator::delete_all_attributes_lookup_data()
Delete all the existing data related to the lookup table, including the table itself.
Method of the class: DataRegenerator{}
No Hooks.
Return
null
. Nothing (null).
Usage
// private - for code of main (parent) class only $result = $this->delete_all_attributes_lookup_data();
DataRegenerator::delete_all_attributes_lookup_data() DataRegenerator::delete all attributes lookup data code WC 8.7.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(); if ( $this->data_store->check_lookup_table_exists() ) { $wpdb->query( "TRUNCATE TABLE {$this->lookup_table_name}" ); // phpcs:disable WordPress.DB.PreparedSQL.InterpolatedNotPrepared } }