Support » Plugin: LearnPress - WordPress LMS Plugin » Content Drip – Date set in Drip items is not saving

  • Hello, this is the problem: when you choose to drip content for course, then set active after a certain date, and go to drip items settings, then you choose exact date that lesson in unlocked after, date is not saving, instead it shows default unix date (year 1970).

    I believe there is a problem with how date is saving to db from input.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Igor Szostek


    I found this problem, in inc/load.php in content-drip plugin, in the line 354 we have specific date switch case,
    My wordpress is in polish language, so my date was in polish, because default behavior of this calendar from jquery is to translate months in input.

    i have this solution, its not ideal, but it works, best way would be to create an instance of i18n DateTime class and translate through that, somehow force calendar to load english names for this page.

    $m_en = array("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec");
    $m_pol = array("Jan", "Feb", "Mar", "Apr", "Maj", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dec");
    $item['date'] = str_replace($m_pol, $m_en, $item['date']);
    $drip_items[$id]['date'] = strtotime($item['date']);
    • This reply was modified 3 years, 6 months ago by Igor Szostek.

    You’re a life saver! Worked just fine for me as well. Just had to change the translations to portuguese in my case. Thank you

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Content Drip – Date set in Drip items is not saving’ is closed to new replies.