diff --git a/core/Upgrades/Upgrade.php b/core/Upgrades/Upgrade.php index 5db203cdf..b6de584d0 100644 --- a/core/Upgrades/Upgrade.php +++ b/core/Upgrades/Upgrade.php @@ -178,11 +178,11 @@ public function show_update_notice() { */ public function do_updates() { - if ( isset( $_POST['pm_nonce'] ) && ! wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['pm_nonce'] ) ), '_nonce' ) ) { + if ( empty( $_POST['pm_nonce'] ) ) { return; } - if ( ! isset( $_POST['pm_update'] ) ) { + if ( ! wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['pm_nonce'] ) ), '_nonce' ) ) { return; }