Automattic\WooCommerce\Internal\ProductAttributesLookup
DataRegenerator::delete_all_attributes_lookup_data
Delete all the existing data related to the lookup table, optionally including the table itself.
Метод класса: DataRegenerator{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
// private - только в коде основоного (родительского) класса $result = $this->delete_all_attributes_lookup_data( $truncate_table );
- $truncate_table(true|false) (обязательный)
- True to truncate the lookup table too.
Код DataRegenerator::delete_all_attributes_lookup_data() DataRegenerator::delete all attributes lookup data WC 11.2.2
private function delete_all_attributes_lookup_data( bool $truncate_table ) {
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();
$this->data_store->unset_regeneration_aborted_flag();
if ( $truncate_table && $this->data_store->check_lookup_table_exists() ) {
$this->truncate_lookup_table();
}
}