Further woocommerce_termmeta removal
This commit is contained in:
parent
0ddce2aa65
commit
9a3aa8e498
|
@ -167,11 +167,19 @@ class WC_Admin_Attributes {
|
|||
);
|
||||
|
||||
// Update taxonomy ordering term meta
|
||||
$wpdb->update(
|
||||
$wpdb->prefix . 'woocommerce_termmeta',
|
||||
array( 'meta_key' => 'order_pa_' . sanitize_title( $attribute['attribute_name'] ) ),
|
||||
array( 'meta_key' => 'order_pa_' . sanitize_title( $old_attribute_name ) )
|
||||
);
|
||||
if ( get_option( 'db_version' ) < 34370 ) {
|
||||
$wpdb->update(
|
||||
$wpdb->prefix . 'woocommerce_termmeta',
|
||||
array( 'meta_key' => 'order_pa_' . sanitize_title( $attribute['attribute_name'] ) ),
|
||||
array( 'meta_key' => 'order_pa_' . sanitize_title( $old_attribute_name ) )
|
||||
);
|
||||
} else {
|
||||
$wpdb->update(
|
||||
$wpdb->termmeta,
|
||||
array( 'meta_key' => 'order_pa_' . sanitize_title( $attribute['attribute_name'] ) ),
|
||||
array( 'meta_key' => 'order_pa_' . sanitize_title( $old_attribute_name ) )
|
||||
);
|
||||
}
|
||||
|
||||
// Update product attributes which use this taxonomy
|
||||
$old_attribute_name_length = strlen( $old_attribute_name ) + 3;
|
||||
|
|
|
@ -344,7 +344,6 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
'woocommerce_sessions',
|
||||
'woocommerce_api_keys',
|
||||
'woocommerce_attribute_taxonomies',
|
||||
'woocommerce_termmeta',
|
||||
'woocommerce_downloadable_product_permissions',
|
||||
'woocommerce_order_items',
|
||||
'woocommerce_order_itemmeta',
|
||||
|
@ -357,6 +356,10 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
'woocommerce_payment_tokenmeta',
|
||||
);
|
||||
|
||||
if ( get_option( 'db_version' ) < 34370 ) {
|
||||
$tables[] = 'woocommerce_termmeta';
|
||||
}
|
||||
|
||||
foreach ( $tables as $table ) {
|
||||
?>
|
||||
<tr>
|
||||
|
|
Loading…
Reference in New Issue