Hello,
I have the feature to associate custom avatar enabled in the (member types pro) plugin while the (buddypress profile completion) is enabled (user must have profile photo). The issue now is users aren’t being restricted to upload their profile photo/ complete profile since custom avatar has already been uploaded for member types.
buddypress profile completion is already detecting the custom avatar set in member types pro so its not forcing new profile photo upload for new users.
An update to buddypress profile completion might be helpful
I also have the code below in my custom.php file
// Do not redirect users on non bp pages. function buddydev_skip_redirect_on_non_bp_pages( $skip ) { if ( ! is_buddypress() ) { $skip = true; } return $skip; } add_filter( 'bp_force_profile_completion_skip_check', 'buddydev_skip_redirect_on_non_bp_pages' ); // Do not skip redirect on new post. function buddydev_dont_skip_redirect_on_cta_pages( $skip ) { if( is_page( array( 'create-content', 'publish', 'wallet', 'affiliate-area','create-new-post', 'advertise', 'create-new-advert', 'manage-listings' ) ) ) { if( is_user_logged_in() ){ $skip = false; } } return $skip; } add_filter( 'bp_force_profile_completion_skip_check', 'buddydev_dont_skip_redirect_on_cta_pages', 20 );
Hello Tosin,
Please try the following code:
add_filter( 'bp_core_default_avatar_user', function ( $avatar_url, $params ) { if ( function_exists( 'bpmtp_get_option' ) && bpmtp_get_option( 'override_member_avatar', 0 ) ) { $avatar_url = bp_core_avatar_default( 'local', $params ); } return $avatar_url; }, 105, 2 );
Regards
RaviHello Ravi
The code did not work, the code you provided removed the profile photos I set for the member types. I dont want the custom profile photos to be removed but I want the saved membertype profile photo to be compatible and work along side the buddypress profile completion plugin.
Hello Tosin,
I have checked the code and it is working except in admin it does not show the default member type photo on the user list table screen. To fix this you can use the following code:
add_filter( 'bp_core_default_avatar_user', function ( $avatar_url, $params ) { if ( ! is_admin() && function_exists( 'bpmtp_get_option' ) && bpmtp_get_option( 'override_member_avatar', 0 ) ) { $avatar_url = bp_core_avatar_default( 'local', $params ); } return $avatar_url; }, 105, 2 );
Please give it a try with this. If it still does not work please disable other custom code and then try.
Regards
Ravi
You must be logged in to reply to this topic.