Title: UserModel.php error
Last modified: June 23, 2026

---

# UserModel.php error

 *  [Lidia](https://wordpress.org/support/users/lydiamunoz/)
 * (@lydiamunoz)
 * [1 week, 4 days ago](https://wordpress.org/support/topic/usermodel-php-error/)
 * Hi,
 * We are experiencing a critical error after updating LearnPress to version 4.4.0.
   When trying to edit an existing order (changing its status from “Completed” to“
   Pending”), WordPress throws a fatal error and the page returns a 500 error.
 * The error found in the debug.log is the following:
 * Fatal error: Uncaught TypeError in /wp-content/plugins/learnpress/inc/Models/
   UserModel.php on line 123
 * Stack trace: 0 …/learnpress/inc/order/lp-order-functions.php(526): LearnPress\
   Models\UserModel::find() 1 …/learnpress/inc/order/lp-order-functions.php(587):
   learn_press_get_order_refund_event_data() 2 …/learnpress/inc/admin/views/meta-
   boxes/order/details.php(195): learn_press_admin_order_refund_request_panel() 
   3 …/learnpress/inc/lp-template-functions.php(1016): include(‘…’) 4 …/learnpress/
   inc/custom-post-types/order.php(818): learn_press_admin_view()
 * This worked correctly in the previous version. The issue seems to be in the UserModel::
   find() method called from the order refund panel when loading the order edit 
   screen in wp-admin.
 * Could you please look into this? It is affecting our ability to manage student
   orders and enroll them in new courses.
 * Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Support [brianvu-tp](https://wordpress.org/support/users/briantp/)
 * (@briantp)
 * [1 week, 4 days ago](https://wordpress.org/support/topic/usermodel-php-error/#post-18946489)
 * Hi Lidia,
 * Thank you for reaching out to us!
 * Our development team tried to reproduce the issue by creating and editing existing
   orders and changing their status from ‘Completed’ to ‘Pending’. However, during
   our testing with LearnPress version 4.4.0 and the default Twenty Twenty-Five 
   theme, we did not encounter the fatal error you described, and everything worked
   smoothly.
 * In order to investigate this more accurately and pinpoint the exact cause, could
   you please let us know which version of LearnPress you were using that worked
   correctly previously?
 * We look forward to your response so we can provide the best possible solution!
 * Best regards,
   Brianvu-tp
 *  Thread Starter [Lidia](https://wordpress.org/support/users/lydiamunoz/)
 * (@lydiamunoz)
 * [1 week, 2 days ago](https://wordpress.org/support/topic/usermodel-php-error/#post-18948198)
 * The version I had before updating, which was working correctly, is 4.3.8. Thank
   you.
 *  Plugin Support [brianvu-tp](https://wordpress.org/support/users/briantp/)
 * (@briantp)
 * [6 days, 4 hours ago](https://wordpress.org/support/topic/usermodel-php-error/#post-18950518)
 * Hi Lidia,
 * Thank you very much for providing the exact version details.
 * Based on this information, we have successfully addressed the fatal error in 
   our latest release.
 * Please update LearnPress on your website to version 4.4.1, which includes the
   official fix for this issue.
 * Please let us know if everything runs correctly, or if you need any further assistance.
 * Best regards,
   Brianvu-tp

Viewing 3 replies - 1 through 3 (of 3 total)

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fusermodel-php-error%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://ps.w.org/learnpress/assets/icon-256x256.gif?rev=3254420)
 * [LearnPress - WordPress LMS Plugin for Create and Sell Online Courses](https://wordpress.org/plugins/learnpress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/learnpress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/learnpress/)
 * [Active Topics](https://wordpress.org/support/plugin/learnpress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/learnpress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/learnpress/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [brianvu-tp](https://wordpress.org/support/users/briantp/)
 * Last activity: [6 days, 4 hours ago](https://wordpress.org/support/topic/usermodel-php-error/#post-18950518)
 * Status: not resolved