wp_cache_flush after term meta migration

@claudiosmweb
This commit is contained in:
Mike Jolley 2016-06-16 23:31:19 +01:00
parent 0f714a13a4
commit b66bb9ed9d
1 changed files with 1 additions and 0 deletions

View File

@ -859,6 +859,7 @@ function wc_update_260_termmeta() {
if ( get_option( 'db_version' ) >= 34370 && $wpdb->get_var( "SHOW TABLES LIKE '{$wpdb->prefix}woocommerce_termmeta';" ) ) {
if ( $wpdb->query( "INSERT INTO {$wpdb->termmeta} ( term_id, meta_key, meta_value ) SELECT woocommerce_term_id, meta_key, meta_value FROM {$wpdb->prefix}woocommerce_termmeta;" ) ) {
$wpdb->query( "DROP TABLE IF EXISTS {$wpdb->prefix}woocommerce_termmeta" );
wp_cache_flush();
}
}
}