how to disable price options

Home Forums Legacy Support Support queries How-to & Troubleshooting how to disable price options

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #17386
    chinolz
    Spectator
    Hi 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>
    #17575
    Anshuman Sahu
    Keymaster
    Well 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  ?
    #17818
    chinolz
    Spectator
    i just want to show woocommerce price by default. And hide all pmpro
    #18009
    Anshuman Sahu
    Keymaster
    Please 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;   }
    #18030
    chinolz
    Spectator
    adding the code didnt change anything
    #18182
    Anshuman Sahu
    Keymaster
    Sorry 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;   }   }  
    #20580
    chinolz
    Spectator
    the 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/  
    #20581
    chinolz
    Spectator
    user: admin password: San@Sze11110 javamag.org
    #22138
    Anshuman Sahu
    Keymaster
    Well 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 .
    #26820
    chinolz
    Spectator
    Hi 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/
    #27073
    Anshuman Sahu
    Keymaster
    Try 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;   }   }
    #27498
    chinolz
    Spectator
    Still 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/  
    #27544
    chinolz
    Spectator
    solved it there were more than 2 memberships so i had to change the array splice to array_splice($credits,1,6,array()); Thanks for help
    #27853
    H.K. Latiyan
    Participant
    Thanx for confirming. So marking the topic as resolved and closing the topic.
Viewing 14 posts - 1 through 14 (of 14 total)
  • The topic ‘how to disable price options’ is closed to new replies.