Change the mexican state update routing to only update shipping and billing states, not all meta data which matches. Closes #17066
This commit is contained in:
parent
71fce64f54
commit
a8e3862bf2
|
@ -1371,13 +1371,15 @@ function wc_update_320_mexican_states() {
|
||||||
);
|
);
|
||||||
|
|
||||||
foreach ( $mx_states as $old => $new ) {
|
foreach ( $mx_states as $old => $new ) {
|
||||||
$wpdb->update(
|
$wpdb->query(
|
||||||
$wpdb->postmeta,
|
$wpdb->prepare(
|
||||||
array(
|
"
|
||||||
'meta_value' => $new,
|
UPDATE $wpdb->postmeta
|
||||||
),
|
SET meta_value = %s
|
||||||
array(
|
WHERE meta_key IN ( '_billing_state', '_shipping_state' )
|
||||||
'meta_value' => $old,
|
AND meta_value = %s
|
||||||
|
",
|
||||||
|
$new, $old
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
$wpdb->update(
|
$wpdb->update(
|
||||||
|
|
Loading…
Reference in New Issue