I don’t know about “simple”. The function in BP is bp_update_user_last_activity() and that calls WordPress’ user meta functions. I am positive there are filters within that stack you could use to override the value or prevent the writes, but you’ll need to look into that code yourself.
@boonebgorges Do you think we can stop this mirroring yet? And keep _bp_get_user_meta_last_activity_warning
in place. Basically, preventing DB writes.
The simplest way to disable, at the moment, is to squelch the update_user_meta()
call. Untested, but something like this should work:
add_filter( 'update_user_metadata', function( $should_update, $object_id, $meta_key ) {
if ( 'last_activity' === $meta_key ) {
return false;
}
return $should_update;
}, 10, 3 );
I’ve opened a ticket to discuss disabling the backward compatibility feature in BP. https://buddypress.trac.wordpress.org/ticket/7882#ticket