diff --git a/woocommerce.php b/woocommerce.php index e34c518c717..d9ac569d708 100644 --- a/woocommerce.php +++ b/woocommerce.php @@ -481,11 +481,14 @@ final class WooCommerce { public function wpdb_table_fix() { global $wpdb; $wpdb->payment_tokenmeta = $wpdb->prefix . 'woocommerce_payment_tokenmeta'; - $wpdb->woocommerce_termmeta = $wpdb->prefix . 'woocommerce_termmeta'; $wpdb->order_itemmeta = $wpdb->prefix . 'woocommerce_order_itemmeta'; $wpdb->tables[] = 'woocommerce_payment_tokenmeta'; - $wpdb->tables[] = 'woocommerce_termmeta'; $wpdb->tables[] = 'woocommerce_order_itemmeta'; + + if ( get_option( 'db_version' ) < 34370 ) { + $wpdb->woocommerce_termmeta = $wpdb->prefix . 'woocommerce_termmeta'; + $wpdb->tables[] = 'woocommerce_termmeta'; + } } /**