Removing the use of mb_strlen as it is always installed as standard.
This commit is contained in:
parent
791317cfcf
commit
925b46967a
|
@ -229,7 +229,7 @@ function wc_save_order_items( $order_id, $items ) {
|
||||||
$meta_value = ( empty( $meta_values[ $id ] ) && ! is_numeric( $meta_values[ $id ] ) ) ? '' : $meta_values[ $id ];
|
$meta_value = ( empty( $meta_values[ $id ] ) && ! is_numeric( $meta_values[ $id ] ) ) ? '' : $meta_values[ $id ];
|
||||||
|
|
||||||
// Delele blank item meta entries
|
// Delele blank item meta entries
|
||||||
if ( mb_strlen( $meta_key ) == 0 && mb_strlen( $meta_value ) == 0 ) {
|
if ( $meta_key === '' && $meta_value === '' ) {
|
||||||
$wpdb->query( $wpdb->prepare( "DELETE FROM {$wpdb->prefix}woocommerce_order_itemmeta WHERE meta_id = %d", $id ) );
|
$wpdb->query( $wpdb->prepare( "DELETE FROM {$wpdb->prefix}woocommerce_order_itemmeta WHERE meta_id = %d", $id ) );
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
Loading…
Reference in New Issue