How to use wp_set_password in a plugin?

I was using the wrong action hook. Replaced send_headers with init and it works.

Wrong

add_action('send_headers', array($this, 'do_things'));

Right

add_action('init', array($this, 'do_things'));

Leave a Comment