@mwolze
You can try this code snippet.
Install into your child-theme’s functions.php file or use the “Code Snippets” Plugin.
Add a text field to your Registration Form with meta-key set to timezone
and the code snippet will set the default value of this field to the users timezone.
When Registration form is saved the field is updated and you can use the text field later for display and editing (without code snippet support) of the user’s Profile.
add_filter( "um_get_field__timezone", "um_get_field__timezone_custom", 10, 1 );
function um_get_field__timezone_custom( $array ) {
if ( ! defined( 'USER_IP_AND_LOCATION_INC_PATH' ) ) return $array;
if ( version_compare( get_bloginfo( 'version' ),'5.4', '<' ) ) {
$array['default'] = do_shortcode( '[userip_location type="timezone"]' );
} else {
$array['default'] = apply_shortcodes( '[userip_location type="timezone"]' );
}
return $array;
}