Home › Forums › Legacy Support › Support queries › How-to & Troubleshooting › how to disable price options
- This topic has 13 replies, 3 voices, and was last updated 8 years, 2 months ago by H.K. Latiyan.
Viewing 14 posts - 1 through 14 (of 14 total)
-
AuthorPosts
-
January 8, 2016 at 10:21 am #17386chinolzSpectatorHi after updating the vibe course module to <span style="color: #000000; font-family: 'Open Sans', sans-serif; font-size: 13px; line-height: 19.5px; background-color: #fef7f1;">1.9.9.3</span> <span style="line-height: 21.8182px;">The price options dropdown was added.</span> Can you tell me a way to remove this? I want to display only 1 price (even though there are multiple prices pmpro/woocomerce) in 1.9.9.2 i just used css to display:none the list elements (<span style="font-weight: bold; color: #6a6a6a; font-family: arial, sans-serif; font-size: small; line-height: 20.2222px;">li</span><span style="color: #545454; font-family: arial, sans-serif; font-size: small; line-height: 20.2222px;">:first-child etc.. )</span>January 9, 2016 at 11:13 am #17575Anshuman SahuKeymasterWell this is just hardcoded in theme as of now . Can you please share about what do you want to show in pricing of the course is it pmpro membership or woocommerce price ?January 11, 2016 at 9:59 am #17818chinolzSpectatori just want to show woocommerce price by default. And hide all pmproJanuary 12, 2016 at 8:29 am #18009Anshuman SahuKeymasterPlease try adding the given code in your wplms-customizer.php file at the end before " ?> " in wplms customizer plugin : add_filter('wplms_course_product_metabox','custom_wplms_course_metabox12',999); function custom_wplms_course_metabox12($course_settings){ if(!is_admin()){ //unset($course_settings['vibe_mycred_duration']); unset($course_settings['vibe_pmpro_membership']); } return $course_settings; }January 12, 2016 at 10:33 am #18030chinolzSpectatoradding the code didnt change anythingJanuary 13, 2016 at 8:36 am #18182Anshuman SahuKeymasterSorry i gave you the wrong code .Please try adding this code in your wplms-customizer.php file at the end before " ?> " in wplms customizer plugin : add_filter('wplms_course_credits_array','custom_wplms_course_credits_array',10,2); function custom_wplms_course_credits_array($credits,$id){ if(is_array($credits)){ array_splice($credits,1,2,array()); return $credits; } }January 25, 2016 at 10:36 am #20580chinolzSpectatorthe code changes the price to woocommerce however when click on take this course it redirects to same page, on second click to 404. http://javamag.org/course/the-implication-of-malware-in-penetration-testing-w3/1942/January 25, 2016 at 10:37 am #20581chinolzSpectatoruser: admin password: San@Sze11110 javamag.orgJanuary 28, 2016 at 10:31 am #22138Anshuman SahuKeymasterWell this code is working absolutely fine at our end . Please check if you have added any other customizations on the same filter and try deactivating third party plugins for this .February 9, 2016 at 11:22 am #26820chinolzSpectatorHi the code was working, however when i udated to wplms 2.0.2 the price options cannot be removed. Here is the link https://pentestmag.com/all-courses/February 10, 2016 at 7:47 am #27073Anshuman SahuKeymasterTry this code (just changed the priority ): add_filter('wplms_course_credits_array','custom_wplms_course_credits_array',11,2); function custom_wplms_course_credits_array($credits,$id){ if(is_array($credits)){ array_splice($credits,1,2,array()); return $credits; } }February 10, 2016 at 10:16 pm #27498chinolzSpectatorStill not working, disabled all plugins, removed all code from wplms customizer plugin here is the link to stagging site. https://pentestmag2.wpengine.com/all-courses/February 11, 2016 at 9:34 am #27544chinolzSpectatorsolved it there were more than 2 memberships so i had to change the array splice to array_splice($credits,1,6,array()); Thanks for helpFebruary 12, 2016 at 10:30 am #27853H.K. LatiyanParticipantThanx for confirming. So marking the topic as resolved and closing the topic.
-
AuthorPosts
Viewing 14 posts - 1 through 14 (of 14 total)
- The topic ‘how to disable price options’ is closed to new replies.