Membership Levels Show as Private

Home Forums Legacy Support Support queries How-to & Troubleshooting Membership Levels Show as Private

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #109299
    pablomoracantero
    Spectator
    I created 2 Membership Levels on my web. 1- Membresia 2- Diplomado When I selected that a Course should use a Specific Membership Level I get two different results. If I select Membresia It will Look like this. (This is what I want to see) http://prnt.sc/f1juh2 If I select Diplomado it shows "privado"  private, Like this, but I want to show the word "diplomado", http://prnt.sc/f1jv0n     I added this code to get to show like how is showing. <p style="box-sizing: border-box; margin: 0px 0px 22px; color: #4b4d4d; font-family: Lato; font-size: 14px;"><strong style="box-sizing: border-box;">add_filter('wplms_course_credits_array','show_only_menu',9999,2);</p> <p style="box-sizing: border-box; margin: 0px 0px 22px; color: #4b4d4d; font-family: Lato; font-size: 14px;"><strong style="box-sizing: border-box;">function show_only_menu($credits,$id){</p> <p style="box-sizing: border-box; margin: 0px 0px 22px; color: #4b4d4d; font-family: Lato; font-size: 14px;"><strong style="box-sizing: border-box;">    $credits=array();</p> <p style="box-sizing: border-box; margin: 0px 0px 22px; color: #4b4d4d; font-family: Lato; font-size: 14px;"><strong style="box-sizing: border-box;">    $free_course = get_post_meta($id,'vibe_course_free',true);</p> <p style="box-sizing: border-box; margin: 0px 0px 22px; color: #4b4d4d; font-family: Lato; font-size: 14px;"><strong style="box-sizing: border-box;">        if(vibe_validate($free_course)){</p> <p style="box-sizing: border-box; margin: 0px 0px 22px; color: #4b4d4d; font-family: Lato; font-size: 14px;"><strong style="box-sizing: border-box;">            $credits[]= ''.apply_filters('wplms_free_course_price',__('FREE','vibe')).'';</p> <p style="box-sizing: border-box; margin: 0px 0px 22px; color: #4b4d4d; font-family: Lato; font-size: 14px;"><strong style="box-sizing: border-box;">        }else{</p> <p style="box-sizing: border-box; margin: 0px 0px 22px; color: #4b4d4d; font-family: Lato; font-size: 14px;"><strong style="box-sizing: border-box;">            $product_id = get_post_meta($id,'vibe_product',true);</p> <p style="box-sizing: border-box; margin: 0px 0px 22px; color: #4b4d4d; font-family: Lato; font-size: 14px;"><strong style="box-sizing: border-box;">            if(isset($product_id) && $product_id !='' && function_exists('get_product')){ //WooCommerce installed</p> <p style="box-sizing: border-box; margin: 0px 0px 22px; color: #4b4d4d; font-family: Lato; font-size: 14px;"><strong style="box-sizing: border-box;">                $product = get_product( $product_id );</p> <p style="box-sizing: border-box; margin: 0px 0px 22px; color: #4b4d4d; font-family: Lato; font-size: 14px;"><strong style="box-sizing: border-box;">                if(is_object($product)){</p> <p style="box-sizing: border-box; margin: 0px 0px 22px; color: #4b4d4d; font-family: Lato; font-size: 14px;"><strong style="box-sizing: border-box;">                    $link =get_permalink($product_id);</p> <p style="box-sizing: border-box; margin: 0px 0px 22px; color: #4b4d4d; font-family: Lato; font-size: 14px;"><strong style="box-sizing: border-box;">                    $check=vibe_get_option('direct_checkout');</p> <p style="box-sizing: border-box; margin: 0px 0px 22px; color: #4b4d4d; font-family: Lato; font-size: 14px;"><strong style="box-sizing: border-box;">                    if(isset($check) && $check)</p> <p style="box-sizing: border-box; margin: 0px 0px 22px; color: #4b4d4d; font-family: Lato; font-size: 14px;"><strong style="box-sizing: border-box;">                        $link.='?redirect';</p> <p style="box-sizing: border-box; margin: 0px 0px 22px; color: #4b4d4d; font-family: Lato; font-size: 14px;"><strong style="box-sizing: border-box;">                    $price_html = str_replace('class="amount"','class="amount"',$product->get_price_html());</p> <p style="box-sizing: border-box; margin: 0px 0px 22px; color: #4b4d4d; font-family: Lato; font-size: 14px;"><strong style="box-sizing: border-box;">                    $credits[$link] = ''.$price_html.'';</p> <p style="box-sizing: border-box; margin: 0px 0px 22px; color: #4b4d4d; font-family: Lato; font-size: 14px;"><strong style="box-sizing: border-box;">                }</p> <p style="box-sizing: border-box; margin: 0px 0px 22px; color: #4b4d4d; font-family: Lato; font-size: 14px;"><strong style="box-sizing: border-box;">            }</p> <p style="box-sizing: border-box; margin: 0px 0px 22px; color: #4b4d4d; font-family: Lato; font-size: 14px;"><strong style="box-sizing: border-box;">        }</p> <p style="box-sizing: border-box; margin: 0px 0px 22px; color: #4b4d4d; font-family: Lato; font-size: 14px;"><strong style="box-sizing: border-box;">    if ( in_array( 'paid-memberships-pro/paid-memberships-pro.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) {</p> <p style="box-sizing: border-box; margin: 0px 0px 22px; color: #4b4d4d; font-family: Lato; font-size: 14px;"></p> <p style="box-sizing: border-box; margin: 0px 0px 22px; color: #4b4d4d; font-family: Lato; font-size: 14px;"><strong style="box-sizing: border-box;">            $membership_ids = vibe_sanitize(get_post_meta($id,'vibe_pmpro_membership',false));</p> <p style="box-sizing: border-box; margin: 0px 0px 22px; color: #4b4d4d; font-family: Lato; font-size: 14px;"><strong style="box-sizing: border-box;">            if(isset($membership_ids) && is_Array($membership_ids) && count($membership_ids) && function_exists('pmpro_getAllLevels')){</p> <p style="box-sizing: border-box; margin: 0px 0px 22px; color: #4b4d4d; font-family: Lato; font-size: 14px;"><strong style="box-sizing: border-box;">            //$membership_id = min($membership_ids);</p> <p style="box-sizing: border-box; margin: 0px 0px 22px; color: #4b4d4d; font-family: Lato; font-size: 14px;"><strong style="box-sizing: border-box;">            $levels=pmpro_getAllLevels();</p> <p style="box-sizing: border-box; margin: 0px 0px 22px; color: #4b4d4d; font-family: Lato; font-size: 14px;"><strong style="box-sizing: border-box;">                foreach($levels as $level){</p> <p style="box-sizing: border-box; margin: 0px 0px 22px; color: #4b4d4d; font-family: Lato; font-size: 14px;"><strong style="box-sizing: border-box;">                    if(in_array($level->id,$membership_ids)){</p> <p style="box-sizing: border-box; margin: 0px 0px 22px; color: #4b4d4d; font-family: Lato; font-size: 14px;"><strong style="box-sizing: border-box;">                        $link=get_option('pmpro_levels_page_id');</p> <p style="box-sizing: border-box; margin: 0px 0px 22px; color: #4b4d4d; font-family: Lato; font-size: 14px;"><strong style="box-sizing: border-box;">                        $link=get_permalink($link).'#'.$level->id;</p> <p style="box-sizing: border-box; margin: 0px 0px 22px; color: #4b4d4d; font-family: Lato; font-size: 14px;"><strong style="box-sizing: border-box;">                        $credits[$link] = ''.$level->name.'';</p> <p style="box-sizing: border-box; margin: 0px 0px 22px; color: #4b4d4d; font-family: Lato; font-size: 14px;"><strong style="box-sizing: border-box;">                       </p> <p style="box-sizing: border-box; margin: 0px 0px 22px; color: #4b4d4d; font-family: Lato; font-size: 14px;"><strong style="box-sizing: border-box;">                    }</p> <p style="box-sizing: border-box; margin: 0px 0px 22px; color: #4b4d4d; font-family: Lato; font-size: 14px;"><strong style="box-sizing: border-box;">                     break;</p> <p style="box-sizing: border-box; margin: 0px 0px 22px; color: #4b4d4d; font-family: Lato; font-size: 14px;"><strong style="box-sizing: border-box;">                }</p> <p style="box-sizing: border-box; margin: 0px 0px 22px; color: #4b4d4d; font-family: Lato; font-size: 14px;"><strong style="box-sizing: border-box;">            }</p> <p style="box-sizing: border-box; margin: 0px 0px 22px; color: #4b4d4d; font-family: Lato; font-size: 14px;"><strong style="box-sizing: border-box;">          }</p> <p style="box-sizing: border-box; margin: 0px 0px 22px; color: #4b4d4d; font-family: Lato; font-size: 14px;"><strong style="box-sizing: border-box;">          return $credits;</p> <p style="box-sizing: border-box; margin: 0px 0px 22px; color: #4b4d4d; font-family: Lato; font-size: 14px;"></p> <p style="box-sizing: border-box; margin: 0px 0px 22px; color: #4b4d4d; font-family: Lato; font-size: 14px;"><strong style="box-sizing: border-box;">}</p>  
    #109454
    H.K. Latiyan
    Participant
    The private is shown because the course is set to be paid but there is no membership or product connected to it for the users to purchase it. If you want your course to be free then please set the course as free in the course pricing settings. If you only want to change the private text, then you can translate the private text using the loco translate plugin. Let me know if this helps.
    #110076
    pablomoracantero
    Spectator
    I need to show the Membership Level instead of Private. I already have a product link to the course.   What Can I do to have that private taken away and seen the membership level.      
    #110206
    H.K. Latiyan
    Participant
    The membership level will automatically be shown on the course page if you connect the membership level with the course and no private label will be shown. If you are facing issues in connecting the membership level, then please share the course url and the admin credentials with us to check the issue on your website. PS: Please mark your reply as private while sharing the credentials.
    #110300
    pablomoracantero
    Spectator
    This reply has been marked as private.
    #110439
    H.K. Latiyan
    Participant
    This reply has been marked as private.
Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Membership Levels Show as Private’ is closed to new replies.