Hide pricing wherever course appears

Home Forums Legacy Support Support queries How-to & Troubleshooting Hide pricing wherever course appears

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #34812
    andrewtconroy
    Spectator
    Hello, I am setting up a single level subscription based site. Subscribing to the site will give access to all courses. Since I won't be selling individual course, it's confusing to have a price for each listed when that is the price for all. Would you be able to get me a gist or snippet of code to turn off the price everywhere? I am using a modified gist from another post to hide the price hen viewing the course but, I need to hide the price when looking at the courses in all location not just when viewing the course itself. ie, All Courses page, when using  a course widget, or when searching the courses. Any help would be fantastic. The theme is really great to work with btw. :) Andrew
    #34813
    andrewtconroy
    Spectator
    It might be best to use something like the Groups plugin and control the accessible pages manually. But it would be awesome to use more of the features you have already built into the site. Let me know what the best plan of attack would be.  
    #34920
    H.K. Latiyan
    Participant
    If you don't want to show pricing then do not attach any product to the course.
    #35013
    andrewtconroy
    Spectator
    Yes, that kinda works. Is there a way to hide the price and still take advantage of the theme's locking and unlocking of courses based on their subscription?
    #35252
    Anshuman Sahu
    Keymaster
    You can connect the membership plan in your courses and then add the following code to hide the membership name and show a custom label instead of membership name . Add the code in your wplms-customizer.php file in wplms customizer plugin : add_filter('wplms_course_credits_array','customwplms_course_credits_array',10,2); function customwplms_course_credits_array($credits,$id){     $flag = 0;     $new_credits = array();    if ( in_array( 'paid-memberships-pro/paid-memberships-pro.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) {             $membership_ids = vibe_sanitize(get_post_meta($id,'vibe_pmpro_membership',false));             $match = array();             if(isset($membership_ids) && is_Array($membership_ids) && count($membership_ids) && function_exists('pmpro_getAllLevels')){              $link=get_option('pmpro_levels_page_id');              $link=get_permalink($link);              foreach($membership_ids as $membership_id){                 $match[]=$link.'#'.$membership_id;              }                             foreach($credits as $key => $value){                 if(in_array($key,$match)){                     $flag=1;                     $new_credits[$key] = 'My custom label';                 }else{                     $new_credits[$key] = $value;                 }              }           }     }     if($flag)         $credits = $new_credits;     return $credits;   } Change the " My custom label " to your own label or you can leave a space instead of that.
    #45587
    andrewtconroy
    Spectator
    Thanks for the code, but it seems expect that I'm using "paid-memberships-pro" and "vibe_pmpro_membership" plugins, which I do not have installed currently. Does Vibe require these plugins to handle membership payments, or are there other alternatives that I'm missing? Thanks!  
    #45679
    H.K. Latiyan
    Participant
    For membership you can simply use pmpro plugin , for memberships wplms recommends pmpro plugin.
Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Hide pricing wherever course appears’ is closed to new replies.