So I'm trying to extend UltimateMember's functionality with a custom plugin called "testFamily". In the plugin I have testFamily.php, with these functions:
require plugin_dir_path( __FILE__ ) . '../ultimate-member/includes/core/um-actions-login.php';
function register_hooks() {
add_action( 'um_user_login', 'onLogin', 999, 1 );
add_action( 'init' , 'testInit');
}
function testInit() {
echo "Hello";
}
function onLogin($userid, $args) {
// do some stuff after logging in...
}
register_hooks();
The init
callback works fine, but the um_user_login
callback doesn't run at all. I even set the function code to die();
and it doesn't work.
Calling function_exists('um_user_login')
returns true.
I've also tried to implement it as a child theme like the docs say, but it doesn't run then either. I've tried example code from the website
I used a different hook:
um_on_login_before_redirect
and it worked just fine.