Free courses not loading

This topic contains 5 replies, has 2 voices, and was last updated by  Alex 1 year, 7 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #10731

    sandibitenc-net
    Participant

    Hi

    My free courses are not loading when I have your custom code from this thread: https://wplms.io/forums/topic/buy-from-site-not-working/

    When this code is in wplms-customizer only the premium courses load text and images. If I disable it then everything loads fine.

    This is the code:

    add_filter(‘bp_course_rest_prepare_course’,function($response, $course, $request){
    if(!empty($response->data[‘course’][‘price_html’]) && is_array($response->data[‘course’][‘price_html’])){
    foreach ($response->data[‘course’][‘price_html’] as $key => $value) {
    $response->data[‘course’][‘price_html’][$key][‘link’] =  ‘https://vdihni.si/cenik-meditacij-premium-meditacije/’;
    }
    }else{
    $response->data[‘course’][‘price_html’][‘link’] =’https://vdihni.si/cenik-meditacij-premium-meditacije/’;
    }
    return $response;
    },10,3);

    #10753

    Alex
    Keymaster

    Well the code is working perfectly fine at my end .There might be some html formatting getting copied along with it while copying the code from here .
    Can you please try copying the code from this link and remove the previous one : https://gist.github.com/alexvibealex/b22dc732e6c12281b3c3b88259f51f10

    #10760

    sandibitenc-net
    Participant

    I tried it again but no it’s not working. When this code is not in customizer then all courses load like they should (talking about the page with the button on the bottom – buy, start etc).

    When I apply the code, the paid courses load fine and the code works, but free courses stop loading (see screenshot).

    When I then remove the code again it starts working again, so I guess it can’t be anything else.

    I’ve also tried changing the API version, but still the same.

    <mark style=”white-space: pre;”>https://snag.gy/omcZRs.jpg</mark&gt;

    #10773

    Alex
    Keymaster

    Ok please share your ftp credentials and site url along with admin credentials to check this issue .
    PS : mark reply as private while sharing .

    #10777

    sandibitenc-net
    Participant
    This reply has been marked as private.
    #10800

    Alex
    Keymaster

    fixed it  🙂

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.

Template Design © VibeThemes. All rights reserved.