Automattic\WooCommerce\Internal\ProductAttributesLookup
DataRegenerator::get_table_creation_sql()
Get the SQL statement that creates the product attributes lookup table, including the indices.
Метод класса: DataRegenerator{}
Хуков нет.
Возвращает
Строку
.
Использование
$DataRegenerator = new DataRegenerator(); $DataRegenerator->get_table_creation_sql();
Код DataRegenerator::get_table_creation_sql() DataRegenerator::get table creation sql WC 9.7.1
public function get_table_creation_sql() { global $wpdb; $collate = $wpdb->has_cap( 'collation' ) ? $wpdb->get_charset_collate() : ''; return "CREATE TABLE {$this->lookup_table_name} ( product_id bigint(20) NOT NULL, product_or_parent_id bigint(20) NOT NULL, taxonomy varchar(32) NOT NULL, term_id bigint(20) NOT NULL, is_variation_attribute tinyint(1) NOT NULL, in_stock tinyint(1) NOT NULL, INDEX is_variation_attribute_term_id (is_variation_attribute, term_id), PRIMARY KEY ( `product_or_parent_id`, `term_id`, `product_id`, `taxonomy` ) ) $collate;"; }