Update only if the code got changed
This commit is contained in:
parent
93febdca19
commit
f5e1b4fa54
|
@ -2211,7 +2211,7 @@ function wc_update_450_sanitize_coupons_code() {
|
|||
$coupon_id = intval( $data['ID'] );
|
||||
$code = trim( wp_filter_kses( $data['post_title'] ) );
|
||||
|
||||
if ( ! empty( $code ) ) {
|
||||
if ( ! empty( $code ) && $data['post_title'] !== $code ) {
|
||||
$wpdb->update(
|
||||
$wpdb->posts,
|
||||
array(
|
||||
|
|
Loading…
Reference in New Issue