Support » Plugin: Invite Anyone » Replace Accept URL With My Own Link

  • Hi there Boone,
    This is an awesome plugin! I’ve been having some issues with the accept invitation link. I can’t figure out why it always gives me a 404 error.

    I’m trying to create a workaround for this that will allow me to use my own link and still mark the invitation as accepted automatically. I’m using WP-Achievements at the moment, and I want to be able to actually trigger an achievement when someone’s invite is accepted.

    Can you please point me in the right direction? Specifically, which plugin files and functions do I need to modify to accomplish this?

    Thanks again for creating such an incredible plugin, and keep up the good work!

Viewing 2 replies - 16 through 17 (of 17 total)
  • Things are beginning to shape up.
    And thanks to you, I finally understand how action hooks and filters work.

    I’m still working on the invite validation message function, but I did manage to get invite_anyone_activate_user() working with my membership plugin by adding:
    add_action('bp_complete_signup', 'invite_anyone_activate_user', 10, 3);
    So now, it marks the invite as accepted (thank god), but I can’t figure out why the auto-friending isn’t working. I think that the $inviter_id is working, because it’s recognizing the existing invite. Otherwise, it would not mark the invite as accepted. So I’m wondering if the problem lies in the user_id?

    Alright, I have to retract my last statement. I was able to hook into bp_complete_signup, but I’ve realized that it returns this error:

    Warning: Missing argument 2 for invite_anyone_activate_user() in /home/xadmin/public_html/wp-content/plugins/invite-anyone/by-email/by-email.php on line 192

    Warning: Missing argument 3 for invite_anyone_activate_user() in /home/xadmin/public_html/wp-content/plugins/invite-anyone/by-email/by-email.php on line 192

    Warning: Cannot modify header information – headers already sent by (output started at /home/xadmin/public_html/wp-content/plugins/invite-anyone/by-email/by-email.php:192) in /home/xadmin/public_html/wp-includes/pluggable.php on line 896

    I tried changing the action hook like this:
    add_action('bp_complete_signup', 'invite_anyone_activate_user', 10, 1);, but the error persisted. I ended up having to duplicate the invite_anyone_activate_user function’s contents to create my own function with only the $user_id argument. Do you think that the absence of these 2 arguments could be causing the auto-friend to fail?

Viewing 2 replies - 16 through 17 (of 17 total)
  • The topic ‘Replace Accept URL With My Own Link’ is closed to new replies.