mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-06-05 15:09:37 +09:00
- fixed upgrade script;
This commit is contained in:
@@ -21,11 +21,17 @@ function um_upgrade_phone_fields250() {
|
||||
continue;
|
||||
}
|
||||
|
||||
$need_update = false;
|
||||
foreach ( $forms_fields as $key => &$field ) {
|
||||
if ( in_array( $key, array( 'phone_number', 'mobile_number' ), true ) ) {
|
||||
$field['type'] = 'tel';
|
||||
$need_update = true;
|
||||
}
|
||||
}
|
||||
|
||||
if ( $need_update ) {
|
||||
update_post_meta( $form_id, '_um_custom_fields', $forms_fields );
|
||||
}
|
||||
}
|
||||
|
||||
// remove cached option with users count, don't create separate AJAX upgrade for that
|
||||
|
||||
Reference in New Issue
Block a user