diff --git a/includes/admin/core/packages/2.0-beta1/user_roles.php b/includes/admin/core/packages/2.0-beta1/user_roles.php index df228118..17fb8597 100644 --- a/includes/admin/core/packages/2.0-beta1/user_roles.php +++ b/includes/admin/core/packages/2.0-beta1/user_roles.php @@ -133,7 +133,11 @@ if ( ! empty( $um_roles ) ) { } } } elseif ( '_um_profilec_upgrade_role' == $metakey ) { - $metadata = $roles_associations[ $metadata ]; + if ( isset( $roles_associations[ $metadata ] ) ) { + $metadata = $roles_associations[ $metadata ]; + } else { + $metadata = ''; + } } $role_meta[ $metakey ] = $metadata; @@ -149,6 +153,7 @@ update_option( 'um_roles', $role_keys ); global $wp_roles, $wp_version; if ( version_compare( $wp_version, '4.9', '<' ) ) { $wp_roles->_init(); + $wp_roles->reinit(); } elseif ( method_exists( $wp_roles, 'for_site' ) ) { $wp_roles->for_site( get_current_blog_id() ); } diff --git a/readme.txt b/readme.txt index 20e383af..f30e90c0 100644 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ Plugin URI: https://ultimatemember.com/ Contributors: ultimatemember, champsupertramp, nsinelnikov Donate link: Tags: community, member, membership, user-profile, user-registration -Requires at least: 4.1 +Requires at least: 4.7 Tested up to: 4.9 Stable tag: 2.0.23 License: GNU Version 2 or Any Later Version