Looks like I get to replace this functionality again. I originally switched TO freegeoip in this issue at https://github.com/WebDevStudios/BuddyPress-Registration-Options/issues/101 for version 4.3.0
However, they went premium as well it appears.
If you prefer not commenting out code, and just want to not have this spot shown at all for the time being, you should be able to add this line to your functions.php file:
remove_action( ‘bpro_hook_member_item_additional_data’, ‘bp_registration_options_ip_data’, 10, 1 );
However, we don’t have any pending updates to release in the near future, so leaving commented out would work as well. Perhaps we should do a bug release to address this new one though.
Thanks for the response, and your solution is a more elegant fix in the meantime.
On our server this problem doesn’t pop up unless there are >20 pending member requests. After that point, however, the member request page shows a 504 Gateway Timeout error. I guess the PHP script is still running but it takes too long for nginx. Unfortunately, at this point, the only solution is to do a manual update to the database, changing the metavalues of the items in the query:
SELECT *
FROM wp_usermeta um
WHERE um.meta_key = '_bprwg_is_moderated'
AND meta_value <> 'false'
;
Thanks for your plugin and I hope this helps!
Is adding that remove_action() line not working as expected in that the location data fetching it’s still causing timeouts for you?
Sorry if this was confusing. I just wanted to clarify how someone could access the database to fix this if they were stuck with a gateway timeout and couldn’t modify the code.
I initially took the approach of removing the bpro_hook_member_item_additional_data action but if I recall other data (used for moderating users) was completetly missing afterwards. It worked, though, but in the end I preferred to fire the bpro_hook_member_item_additional_data action but specifically comment out the wp_remote_get() call in function bp_registration_options_ip_data().
Gotcha. Makes sense to me for sure.