query in the course of the database

Home Forums Legacy Support Support queries Update Issues query in the course of the database

Viewing 6 posts - 31 through 36 (of 36 total)
  • Author
    Posts
  • #318903
    Anshuman Sahu
    Keymaster
    I doubt any third party plugin using get_current_user_id() would work . Even we had to change our addons code as well to make them work with wplms V4 version . I already told you how to do it even shared the code how to do it, with your code. AS this is part of custom job we can only guide about the theme details and code .Making it work is your developer or your part .
    #318925
    Anshuman Sahu
    Keymaster
    I have checked the code provided previously , here is the tried and tested code which is working :
    
    add_filter( 'bp_course_api_get_user_course_status_item',function($return, $request ){
        $body = json_decode($request->get_body(),true);
        if(!empty($body['token']) && is_numeric($request['course'])){
            
            $user = apply_filters('vibebp_api_get_user_from_token','',$body['token']);
            $user_id = $user->id;
        }
        if(!empty($user_id)){
            //do your thing here and add the content to :
    
            ob_start();
           echo 'your dynamic content';
    
            
              
    
            $cont =  ob_get_clean();
    
            $return['content'] .= $cont;//here the content is appending in api call return 
        }
    
        return $return;
    },10,2);
    
    #318929
    Food-interactive
    Participant
    this code is working in the new wplms or the 3.9?
    #319091
    Food-interactive
    Participant
    This reply has been marked as private.
    #319100
    Anshuman Sahu
    Keymaster
    Well yes you can remove that now in wp-admin -> wplms -> footer -> google anaylitics script as that tip is useless.
    #319230
    Food-interactive
    Participant
    This reply has been marked as private.
Viewing 6 posts - 31 through 36 (of 36 total)
  • The topic ‘query in the course of the database’ is closed to new replies.