Hi guys, i am trying to do similar thing as people posted here, i want to automaticaly add member to usergroup so he can acces some part of forums.
So, i find out that name of function si not sfc_add_membership(), it is sp_add_membership() and it is located in “wp-content/plugins/simple-press/sp-api/sp-api-users.php”.
I tried to call this function in outside file (i included sp-api-users.php), and – doesnt work. Then i “followed” errors and included “sp-api-auths.php”, “sp-api-primitives.php” and “wp-includes/load.php”. But then i got this error:
“PHP Fatal error: Call to a member function get_var() on a non-object in blahblah/wp-content/plugins/simple-press/sp-api/sp-api-primitives.php on line 235 ”
So, i have no idea what to do next 😀 And is this correct way to call this function?