Hello everyone, this is the first update for LearnPress v4.2.0. Here, this update will mainly focus on PHP v8.1 compatibility and code system, alongside some functions. Let’s go!
LearnPress v4.2.0 Update Detail
Added: ‘LP_Question_Cache’, LP_Session_Filter class.
Commented: ‘learn_press_mark_user_just_logged_in’ function.
Commented: ‘set_cookie’ method on class LP_Request.
Fixed: compatibility with WordPress PHP 8.1.
Not implementing ArrayAccess, Iterator, and Countable of PHP on classes: LP_Datetime, LP_Session_Handler, LP_User_Item_Course, LP_User_Item, LP_Quiz_Results, LP_Course_Item, LP_Quiz, LP_Array_Access, and LP_Profile_Tabs.
Except for class LP_Query_List_Table, we still keep implementing ArrayAccess (You will notice the warning but don’t worry, you only need to disable WP_DEBUG mode), because add-ons: LearnPress-H5P (version 4.0.1 and lower) and LearnPress-Assignment (version 4.0.7 and lower) require it. Therefore, you need to update to the higher version of these plugins to make sure.
Fixed: shortcode [learn_press_checkout] working right.
Fixed: security injects SQL (CVE-2022-45820).
Fixed: XSS security.
Fixed: styles Backend, Frontend.
Fixed: Search course in term with Polylang.
Fixed: The error of JSON syntax API search courses and curriculum.
Deprecated: get_time_remaining, get_time of the class LP_User_Item, get_finishing_type of the class LP_User_Item_Course.
Deprecated: get_course_remaining_time on the class LP_Abstract_User.
Deprecated: ‘learn_press_course_question_permalink_friendly’ function.
Deprecated: ‘learn_press_add_order’ function.
Deprecated: learn_press_generate_transaction_object function.
Deprecated: ‘LP_Request_Handler’ class, your need to update add-ons Course Review (version 4.0.4 or higher), and Wishlist (version 4.0.4 or higher).
Deprecated: method ‘get_cart_for_session’ on class LP_Cart.
Deprecated: ‘offsetExists’, ‘offsetGet’, ‘get_current_question’, ‘get_question_position’, ‘check_question’, ‘get_question_link’ methods LP_Quiz class.
Deprecated: ‘instructions’ method on ‘LP_Gateway_Offline_Payment’ class.
Modified: LP_Datetime, deprecated method: toLocal, toRFC822, toUnix, setGMT, getSqlNullDate, addDuration, getPeriod.
Modified: get_expiration_time, deprecated param $format (17502a0).
Modified: class LP_Question_True_Or_False, LP_Question_Single_Choice, LP_Question_Multi_Choice, LP_Question_Fill_In_Blanks (3af1d1c).
Modified: class LP_Question, deprecated method: _get_default_answers, _filter_meta_box_meta, update_answer_orders (3af1d1c)
Modified: method ‘get_answers’ of class LP_Question (3af1d1c)
Not storing key ‘order_awaiting_payment’ in session, you need to update the LearnPress-Certificate add-on to v4.0.4 or higher.
Modified: ‘learn_press_clear_cart_after_payment’ on hook ‘get_header’.
Modified: ‘learn_press_custom_checkout_cart’ on hook ‘learn_press_checkout_cart’.
Modified: LP_Shortcode_Checkout class.
Modified: ‘learn_press_set_user_cookie_for_guest’ function on hook ‘wp’.
Modified: ‘LP_Session_Handler’ class (c12c4b54).
Modified: ‘save_data’ method of class LP_Session_Handler (c12c4b5).
Modified: ‘get_cart_from_session’, ‘get_session_data’, ‘save_data’ methods on class LP_Session_Handler.
Change the name ‘get_session’ method to ‘get_session_by_customer_id’.
Modified: ‘update_session_timestamp’, ‘delete_session’ methods on class LP_Session_Handler.
Modified: ‘LP_Cart’, optimize how to set session for cart, get cart items when called, instance of set on hook ‘wp_loaded’ always call, not call ‘set_cart_cookies’ when ‘add_to_cart’ method called.
Modified: ‘calculate_totals’ on class LP_Cart.
Modified: ‘LP_Profile_Tabs’ class.
Replace all access via array to fields and methods of classes LP_Query_List_Table, LP_Profile, and LP_Profile_Tab.
Modified: ‘create_order’ method on the class ‘LP_Checkout’.
Modified: Method “list_courses” changes how to call the template.
Modified: The statistic of LP Order.
Optimized: handle the session.
Only set the cookie when the user does not log in.
When a user login is successful, the previous session of the guest user is deleted.
When a user logs out, expired sessions are deleted.
Moved: The settings permalink Profile to tab Permalinks.
Checked: The price is valid.
Checked: MathJax.Hub undefined.
Remove: Remove the save lesson preview on the list of lessons on the Backend.
Remove: sortable between multiple sections.
That should be all for this update of the LearnPress v4.2.0 version. For more information, you can visit LearnPress or LearnPress Add-ons.
ThimPress Development Team
Read more: Eduma Mobile App v1.1.0 Update
Contact US | ThimPress:
Website: https://thimpress.com/
Fanpage: https://www.facebook.com/ThimPress
YouTube: https://www.youtube.com/c/ThimPressDesign
Twitter (X): https://twitter.com/thimpress