Title: Internal server error
Last modified: October 3, 2021

---

# Internal server error

 *  Resolved [lemeilleur77](https://wordpress.org/support/users/lemeilleur77/)
 * (@lemeilleur77)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/internal-server-error-669/)
 * Hi,
 * After validating the payment:
    – payment is accepted – the order in Woocommerce
   is visible and in completed status – after validation of the payment, the page
   remains the same with the message “internal server error” – Woocommerce does 
   not send the order confirmation email – the course is attributed to the one who
   registers – if the student buys several products (courses), only the 1st on the
   list will be allocated to the account.
 * It seems have issue on this line (i saw i debug.log)
 *  $ret = $LPUser->enroll( $WPCourse->ID, $WPLPOrder->id, true );`
 * Thanks

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

 *  Plugin Author [Matías Anca](https://wordpress.org/support/users/matiasanca/)
 * (@matiasanca)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/internal-server-error-669/#post-14945341)
 * Hi,
 * Do you required to create an account on checkout?
    Could you please share your
   debug.log and any url site to check it?
 * Thanks!
 *  Thread Starter [lemeilleur77](https://wordpress.org/support/users/lemeilleur77/)
 * (@lemeilleur77)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/internal-server-error-669/#post-14948854)
 * Hi,
 * Thank you for your answer.
 * It is proposed to create an account in checkout page or to connect with the exiting
   account. It worked before like this with this configuration. But I can change
   that and make test.
 * I already sent you an email few days ago with debug files.
 * Thanks !
 *  [gumnutmagic](https://wordpress.org/support/users/gumnutmagic/)
 * (@gumnutmagic)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/internal-server-error-669/#post-15020341)
 * We are also getting the same. When an existing, logged in user buys something,
   instead of progressing to the successful payment page, the user stays on the 
   payment screen, but with a banner at the top saying “internal server error”. 
   The actual payment and purchase are successful, but because it isn’t clear to
   the user, they end up trying again and spending a whole heap of money that then
   needs to be manually refunded.
 * It appears to only happen with existing logged in users, not new users.
 * Logs below:
 *     ```
       [Sun Oct 24 23:28:18.986663 2021] [proxy_fcgi:error] [pid 5915:tid
       139736190498560] [client XXX.XXX.XXX.XXX:XXXXX] AH01071: Got error 'PHP
       message: PHP Fatal error: Uncaught Error: Call to undefined method
       LP_User::enroll() in
       /home/XXXX/learn.gumnutmagic.com/wp-content/plugins/manca-lp-wc-integration/admin/enrollment-sync.php:60\nStack
       trace:\n#0
       /home/XXXX/learn.gumnutmagic.com/wp-includes/class-wp-hook.php(305):
       lpwci_lp_enroll_on_wc_payment_complete(5338)\n#1
       /home/XXXX/learn.gumnutmagic.com/wp-includes/class-wp-hook.php(327):
       WP_Hook->apply_filters('', Array)\n#2
       /home/XXXX/learn.gumnutmagic.com/wp-includes/plugin.php(470):
       WP_Hook->do_action(Array)\n#3
       /home/XXXX/learn.gumnutmagic.com/wp-content/plugins/woocommerce/includes/class-wc-order.php(364):
       do_action('woocommerce_ord...', 5338,
       Object(Automattic\\WooCommerce\\Admin\\Overrides\\Order))\n
       ```
   
 * Cheers!
 *  [gumnutmagic](https://wordpress.org/support/users/gumnutmagic/)
 * (@gumnutmagic)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/internal-server-error-669/#post-15022119)
 * Just commenting out line 60 of enrollment-sync.php seems to fix the problem. 
   Learnpress appears to have removed the $LPUser->enroll() function. For some reason
   the enrollment seems to still work without line 60.
 *  Thread Starter [lemeilleur77](https://wordpress.org/support/users/lemeilleur77/)
 * (@lemeilleur77)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/internal-server-error-669/#post-15035909)
 * Hi !
 * [@gumnutmagic](https://wordpress.org/support/users/gumnutmagic/) I commented 
   line 60 and now everything is working ! For new user or logged in users, they
   can get 2 course whithout any problem!
 * Thanks you very much !!!
 *  Thread Starter [lemeilleur77](https://wordpress.org/support/users/lemeilleur77/)
 * (@lemeilleur77)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/internal-server-error-669/#post-15035922)
 * Thanks also Matias for this plugin !!!
 * —- Problem fixed —-
 *  [bedigital](https://wordpress.org/support/users/bedigital/)
 * (@bedigital)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/internal-server-error-669/#post-15044617)
 * Hi,
 * we have the same issue.
 * [@matiasanca](https://wordpress.org/support/users/matiasanca/) Do we need to 
   force users to register a new account or log in if they already have one?
 * If I comment out “line 60” will this cause any issue?
 * Thanks,
    B
 *  Plugin Author [Matías Anca](https://wordpress.org/support/users/matiasanca/)
 * (@matiasanca)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/internal-server-error-669/#post-15105281)
 * Hi [@lemeilleur77](https://wordpress.org/support/users/lemeilleur77/), [@gumnutmagic](https://wordpress.org/support/users/gumnutmagic/),
   [@bedigital](https://wordpress.org/support/users/bedigital/)
    There is a new 
   version of the plugin which solves the problem with LearnPress 4. Please update
   the plugin to version 1.1.
 * Thanks for being patiente.
    Regards, Matías Anca
 *  Plugin Author [Matías Anca](https://wordpress.org/support/users/matiasanca/)
 * (@matiasanca)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/internal-server-error-669/#post-15110069)
 * I’m so sorry.
    There was a problem with my SVN uploading version 1.1. The new
   version 1.1.2 solves the problem.
 * Regards,
    Matías Anca

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

The topic ‘Internal server error’ is closed to new replies.

 * ![](https://ps.w.org/manca-lp-wc-integration/assets/icon-256x256.png?rev=2305826)
 * [Cool Integration for LearnPress & WooCommerce](https://wordpress.org/plugins/manca-lp-wc-integration/)
 * [Support Threads](https://wordpress.org/support/plugin/manca-lp-wc-integration/)
 * [Active Topics](https://wordpress.org/support/plugin/manca-lp-wc-integration/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/manca-lp-wc-integration/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/manca-lp-wc-integration/reviews/)

 * 9 replies
 * 4 participants
 * Last reply from: [Matías Anca](https://wordpress.org/support/users/matiasanca/)
 * Last activity: [4 years, 6 months ago](https://wordpress.org/support/topic/internal-server-error-669/#post-15110069)
 * Status: resolved