Dec 19, 2022 9:48 am
Hello,
How to overwrite ajax subscribe methode ?
This code in themes/mytheme/wpforo/functions.php not work for me :
remove_action( 'wp_ajax_wpforo_subscribe_ajax', ['Actions', 'subscribe'], 99 );
remove_action( 'wp_ajax_nopriv_wpforo_subscribe_ajax', ['Actions', 'subscribe'], 99 );
add_action('wp_ajax_wpforo_subscribe_ajax', 'my_subscribe', 999);
add_action('wp_ajax_nopriv_wpforo_subscribe_ajax', 'my_subscribe', 999);
function my_subscribe(){
...
}
Thank you !
4 Replies
Dec 24, 2022 10:06 am
Hi @abdeslam,
You have done almost right, you have written Action but didn't specify which namespace tag action.