[2.6] Prevent notice in wpdb_table_fix if termmeta table is not used

This commit is contained in:
Mike Jolley 2016-08-02 14:09:56 +01:00
parent 3c1f5e5e46
commit 674e00ea55
1 changed files with 5 additions and 2 deletions

View File

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