Home › Forums › Legacy Support › Support queries › How-to & Troubleshooting › Hide pricing wherever course appears
Tagged: Course Details, course price, hide price, Price
- This topic has 6 replies, 3 voices, and was last updated 8 years, 6 months ago by H.K. Latiyan.
Viewing 7 posts - 1 through 7 (of 7 total)
-
AuthorPosts
-
March 8, 2016 at 12:32 am #34812andrewtconroySpectatorHello, 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. :) AndrewMarch 8, 2016 at 12:35 am #34813andrewtconroySpectatorIt 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.March 8, 2016 at 10:54 am #34920H.K. LatiyanParticipantIf you don't want to show pricing then do not attach any product to the course.March 8, 2016 at 2:53 pm #35013andrewtconroySpectatorYes, 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?March 9, 2016 at 3:01 pm #35252Anshuman SahuKeymasterYou 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.April 29, 2016 at 7:07 pm #45587andrewtconroySpectatorThanks 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!April 30, 2016 at 12:06 pm #45679H.K. LatiyanParticipantFor membership you can simply use pmpro plugin , for memberships wplms recommends pmpro plugin.
-
AuthorPosts
Viewing 7 posts - 1 through 7 (of 7 total)
- The topic ‘Hide pricing wherever course appears’ is closed to new replies.