Okay
  Public Ticket #3593250
Can I disable certain features in the dashboard?
Closed

Comments

  • Sneha started the conversation

    Hi,

    I have two questions:

    1. I want a user to get access to the dashboard only if he has purchased a course. Not otherwise. Can that be done?

    2. I have a basic and pro version and I want to diable vibe appointments in PRO version. Can I do that?

  • [deleted] replied

    1 . yes its possible but it will be paid customization . 

    2 . im sorry there are basic and pro versions in appointments , could you please explain more on this.

  • Sneha replied

    Hey , 

    How much would the paid customization charge for the user login on purchase.

  • Sneha replied

    I have a course that has a basic and Pro version. I have to disable appointments in the BASIC version and not PRO.

  • [deleted] replied

    Well simply do not create slots for the basic version of the course only create appointment slot for the pro version of course . 

    for the access to dashboard page : How to add code in wplms customizer plugin

    add this code in your wplms-customizer.php file in wplms customizer plugin : 


    add_action('template_redirect',function(){
        if(function_exists('vibebp_get_setting')){
            $app_page = vibebp_get_setting('bp_single_page');
            if(!empty($app_page) && is_page($app_page)){
                if(is_user_logged_in()){
                    $courses = bp_course_get_user_courses(get_current_user_id());
                    if(empty($courses)){
                        wp_die(_x('You do not have access to this page please purchase a course first','','wplms'));
                    }
                }
            }
        }
        
    });

    enable sync vibebp login with wp from wp-admin -> vibebp-> settings . 

    this will not work for admin user . 


    make sure you have setup bp single page : https://docs.wplms.io/administrator-guide/step-by-step-guide-for-administrators/required-pages-for-wplms#bp-single-page


    above code will restrict access to this page . 

  • Sneha replied

    Great Thank you, and how about the login set up only on purchase? Can you guide me through how I can do the same.

  • [deleted] replied

    yes the code given below will only allow access to dashboard page when user purchase a course m, he can login though but cannot access dashboad he will see message :

    .

    You do not have access to this page please purchase a course first



  • Sneha replied

    I dont see a wplms customizer plugin

    Attached files:  WhatsApp Image 2024-02-29 at 23.53.39_d522b58c.jpg

  • Sneha replied

    Thanks, Alex, 

    A quick follow-up question for the appointments section 

    Context: 

    I have created two courses, XX (Basic) & XX(Pro). Now I need the appointments section to show up in the sidebar of the users who have signed up on XX(Pro). In addition, I want a user who signs up to XX(Pro) also to have access to XX(Basic). As (Pro) is just a subset of (Basic). I wanted to confirm if this is possible before I purchased the plugin.

  • [deleted] replied

    One question for you : are those slots to be booked would be paid or free ? 

    if free then yes its possible . actually you have to add the slot booking widget for course in both the courses  but slots will only be added to the course with slots and will show only on that course on the course home page and users will be able to book the slot .


  • Sneha replied

    Yep, its going to be free for Pro users. No payments are involved, since for basic we do not show the slots itself.

  • [deleted] replied

    ok then you are good to go : 

    if free then yes its possible . actually you have to add the slot booking widget for course in both the courses  but slots will only be added to the course with slots and will show only on that course on the course home page and users will be able to book the slot .