• Resolved dval09

    (@dval09)


    Hi, I am experiencing some challenges with the BadgeOS plugin and its integration with LearnDash and BuddyPress. Originally, I contacted BuddyPress about this and they recommended I contact you. Here’s the correspondence:

    ME: on this page: https://ahafastingacademy.com/badges/aha-founders-badge/, when clicking on one of the users’ profiles, you get redirected to the website store.

    BuddyPress: Can you please run a compatibility test for me? You can do it by deactivating all the other plugins and then activate them one by one to find out the conflicting plugin. It will help us further debug the issue.

    ME: It is the LearnDash Woocommerce Integration plugin that is causing the redirect to /Store

    But, when deactivated, it redirects to author/username/
    I want it to do to /members/username

    Does that make sense?

    So two issues:

    1. the LearnDash Woocommerce Integration plugin

    2. After that bug is fixed, have the redirect url path changed from /author to /members

    BuddyPress: Hope you are doing great ??
    Where is that ‘People who have earned this:’ section coming from?

    As BadgeOS is third-party plugin can you please get in touch with plugin support forum about the issue?

    I also am having challenges getting the members’ points to showcase on their profiles. But, this is secondary. Can you help with this? Thank you.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author learningtimes

    (@learningtimes)

    Hi @dval09

    It seems you are using “badgeos_get_achievement_earners_list()” to get the list of the earners of the badge which displays the user profile URL. Use below snippet to change the author URL to BuddyPress member URL.

    /**
     * Alter user profile URL
     *
     * @param $user_content
     * @param $user_id
     * @return string
     */
    function alter_user_profile_url( $user_content, $user_id ) {
        $user_data = get_userdata( $user_id );
        $user_content = '<li><a href="' . get_bloginfo('url') . '/members/'. $user_data->user_login . '/profile/' . '">' . get_avatar( $user_id ) . '</a></li>';
        return $user_content;
    }
    add_filter( 'badgeos_get_achievement_earners_list_user', 'alter_user_profile_url', 10, 2 );

    Thanks

    Plugin Author learningtimes

    (@learningtimes)

    Hi @dval09

    Since we have not heard from you in a while, we are now closing this thread. If you still need help, don’t hesitate to let us know.

    Thanks

    Thread Starter dval09

    (@dval09)

    Thank you. Add to functions.php?

    Plugin Author learningtimes

    (@learningtimes)

    Hi @dval09

    Yes, add the above snippet at the end of active theme’s functions.php file

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘LearnDash and Badges’ is closed to new replies.