This is in regards to the plugin Theme My Login, although the question may relate to any plugin. The author says he no longer uses the support forum, so I've come here.
I'm trying to unhook the following action, found in /modules/custom-passwords/custom-passwords.php
on line 38
.
class Theme_My_Login_Custom_Passwords extends Theme_My_Login_Abstract {
protected function load() {
add_action( 'register_form', array( &$this, 'password_fields' ) ); // Unhook This!
...
Now I've tried a bunch of versions of the remove_action
function, but none seem to work. Every time I have used remove_action before it has been with a variable, but TML is using the class directly.
I have tried the following in directly before the do_action('register_form')
function call. None seem to work.
remove_action('register_form', array( Theme_My_Login, 'password_fields' ) );
remove_action('register_form', array( Theme_My_Login_Custom_Passwords, 'password_fields' ) );
// get_object() is a method of the original class, and returns the
// object which can be var_dump'd
remove_action('register_form', array( Theme_My_Login::get_object(), 'password_fields' ) );
I know this is the action I need to remove, as I can comment it out within the plugin file and it solves the issue. But I don't want to edit the plugin file, obviously, because I want to keep the plugin updated.