How to remove ajax actions hooked in a plugin and replace them with your own

I needed to use an excellent MASS Users Password Reset plugin for one of my projects. I was not happy with the default password reset email that was being sent out by it.

The password reset email is assembled in send_reset_password_mail_action() function (main.php file) that is hooked to wp_ajax_send_reset_password_mail_action and wp_ajax_nopriv_send_reset_password_mail_action actions.

This is the way I wen about replacing this code with my own.

I hooked a function mm_replace_password_change_body to admin_init action. In this function I did the following


add_action('wp_ajax_send_reset_password_mail_action', [$this, 'mm_send_reset_password_mail_action']);
add_action('wp_ajax_nopriv_send_reset_password_mail_action', [$this, 'mm_send_reset_password_mail_action']);

And in mm_send_reset_password_mail_action I basically copy/pasted content of send_reset_password_mail_action from the plugin with necessary changes.

Note: it is safe to remove wp ajax actions in after_setup_theme hook, see this link

Can’t activate Win8 after a clean install of upgrade version?

I could not activate my Win8 that I clean installed (formatted HDD and installed from clean) because my installation copy was an upgrade version and it should only install on top of other existing windows installation. This page helped a lot Windows 8 Upgrade: clean install possible?

Look closer to the bottom of the page for the heading Activate Windows 8 Pro Upgrade