how to change url private course?

Home Forums Legacy Support Support queries Other issues how to change url private course?

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #51131
    elciospy
    Participant
    I'm trying to folow this tutorial to customize my private course button but not successful... https://wplms.io/support/knowledge-base/connect-private-course-button-to-a-custom-page/ It's my class
    
    if(!class_exists(WPLMS_Customizer_Plugin_Class)){ 
          class WPLMS_Customizer_Plugin_Class{ 
             public function __construct(){
                   add_filter(wplms_private_course_button,array($this,wplms_private_course_button),1,1); } 
    
             function wplms_private_course_button($link){ 
                return /assine; 
             } 
        } 
    }
    
    can somebody help me how to change url private course? thanks in advance! :) Can somebody help me.. Thanks in advance...
    #51139
    I wouldn't have that url hardcoded, but anyways...the attached file should achieve the desired result. Just replace it in your wplms customizer plugin. Let me know if that works for you Edit: I can't upload the file, here's the content:
    if(!class_exists('WPLMS_Customizer_Plugin_Class')){
    
    class WPLMS_Customizer_Plugin_Class{
    public function __construct(){
    add_filter('wplms_private_course_button',array($this,'wplms_private_course_button'),1,1);
    
    } // END public function __construct
    
    function wplms_private_course_button($link){
    return '/assine';
    }
    
    } // END class WPLMS_Customizer_Class
    } // END if(!class_exists('WPLMS_Customizer_Class'))
     
    #51163
    H.K. Latiyan
    Participant
    @elciospy: You code didn't work because you have added the function in the _construct(), it should be outside of it. Urdeke code is  correct, use it.
    #51164
    H.K. Latiyan
    Participant
    To make it more simple you can remove the above code and use the below code in your wplms-customizer.php file: add_filter('wplms_private_course_button','wplms_private_course_button',9,1); function wplms_private_course_button($link){   return 'http://google.com'; }
    #51178
    elciospy
    Participant
    YYYYYYEEAAHHH... IT WORKS NOW Latiyan inside wplms-customizer.php Thank you!!
    #51206
    H.K. Latiyan
    Participant
    Thanks for confirming, so closing the topic.
Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘how to change url private course?’ is closed to new replies.