diff --git a/README.md b/README.md index 54d03a87..3504b653 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ GNU Version 2 or Any Later Version ## Releases -[Official Release Version: 2.5.2](https://github.com/ultimatemember/ultimatemember/releases/tag/2.5.2). +[Official Release Version: 2.5.3](https://github.com/ultimatemember/ultimatemember/releases/tag/2.5.3). ## Changelog diff --git a/includes/admin/core/class-admin-upgrade.php b/includes/admin/core/class-admin-upgrade.php index 0c56bee0..ae30e70b 100644 --- a/includes/admin/core/class-admin-upgrade.php +++ b/includes/admin/core/class-admin-upgrade.php @@ -66,18 +66,24 @@ if ( ! class_exists( 'um\admin\core\Admin_Upgrade' ) ) { if ( ! empty( $this->necessary_packages ) ) { add_action( 'admin_menu', array( $this, 'admin_menu' ), 0 ); - - if ( defined( 'DOING_AJAX' ) && DOING_AJAX && current_user_can( 'manage_options' ) ) { - $this->init_packages_ajax(); - - add_action( 'wp_ajax_um_run_package', array( $this, 'ajax_run_package' ) ); - add_action( 'wp_ajax_um_get_packages', array( $this, 'ajax_get_packages' ) ); - } + add_action( 'wp_loaded', array( $this, 'initialize_upgrade_packages' ), 0 ); } add_action( 'in_plugin_update_message-' . um_plugin, array( $this, 'in_plugin_update_message' ) ); } + /** + * Initialize packages for upgrade process. + * Note: Making that only for the 'manage_options' user and when AJAX running. + */ + public function initialize_upgrade_packages() { + if ( defined( 'DOING_AJAX' ) && DOING_AJAX && current_user_can( 'manage_options' ) ) { + $this->init_packages_ajax(); + + add_action( 'wp_ajax_um_run_package', array( $this, 'ajax_run_package' ) ); + add_action( 'wp_ajax_um_get_packages', array( $this, 'ajax_get_packages' ) ); + } + } /** * Function for major updates diff --git a/readme.txt b/readme.txt index c711b56b..40281b63 100644 --- a/readme.txt +++ b/readme.txt @@ -7,7 +7,7 @@ Tags: community, member, membership, user-profile, user-registration Requires PHP: 5.6 Requires at least: 5.0 Tested up to: 6.1 -Stable tag: 2.5.2 +Stable tag: 2.5.3 License: GNU Version 2 or Any Later Version License URI: http://www.gnu.org/licenses/gpl-3.0.txt @@ -163,6 +163,12 @@ No, you do not need to use our plugin’s login or registration pages and can us * To learn more about version 2.1 please see this [docs](https://docs.ultimatemember.com/article/1512-upgrade-2-1-0) * UM2.1+ is a significant update to the Member Directories' code base from 2.0.x. Please make sure you take a full-site backup with restore point before updating the plugin += 2.5.3: December 19, 2022 = + +* Bugfixes: + + - Fixed: Plugin upgrade DB initialization and PHP Fatal Error. + = 2.5.2: December 14, 2022 = * Enhancements: diff --git a/ultimate-member.php b/ultimate-member.php index b251d51f..8f15c15f 100644 --- a/ultimate-member.php +++ b/ultimate-member.php @@ -3,7 +3,7 @@ Plugin Name: Ultimate Member Plugin URI: http://ultimatemember.com/ Description: The easiest way to create powerful online communities and beautiful user profiles with WordPress -Version: 2.5.2 +Version: 2.5.3 Author: Ultimate Member Author URI: http://ultimatemember.com/ Text Domain: ultimate-member