[2.6] Prevent notice in wpdb_table_fix if termmeta table is not used
This commit is contained in:
parent
3c1f5e5e46
commit
674e00ea55
|
@ -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';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue