Title: Set order status as Completed from php code
Last modified: January 17, 2025

---

# Set order status as Completed from php code

 *  Resolved [fizpropaganda](https://wordpress.org/support/users/fizpropaganda/)
 * (@fizpropaganda)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/set-order-status-as-completed-from-php-code/)
 * I want to create custom gateway and I know when payment completed, so I need 
   to update LMS Lifter’s order status from Pending to Completed from my php code.
   Is it possible?

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

 *  Plugin Author [Brian Hogg](https://wordpress.org/support/users/brianhogg/)
 * (@brianhogg)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/set-order-status-as-completed-from-php-code/#post-18249609)
 * Hi [@fizpropaganda](https://wordpress.org/support/users/fizpropaganda/) !
 * It’s certainly possible to change the status of an order via PHP code, but assistance
   with customization is beyond the support we’re able to provide. You can search
   the code for instances of `LLMS_Order` for examples of its usage (ie. the `set_status`
   method).
 *  Thread Starter [fizpropaganda](https://wordpress.org/support/users/fizpropaganda/)
 * (@fizpropaganda)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/set-order-status-as-completed-from-php-code/#post-18250230)
 * Thank you for answer!
 * Can I get example how to call method set_status from my external code?
 *  Plugin Author [Brian Hogg](https://wordpress.org/support/users/brianhogg/)
 * (@brianhogg)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/set-order-status-as-completed-from-php-code/#post-18250378)
 * Hi [@fizpropaganda](https://wordpress.org/support/users/fizpropaganda/) !
 * As mentioned help with customization is beyond the support we can provide, and
   we don’t have an example of setting an order status (and somehow fetching the
   correct order ID based on a payment from an external gateway) on [our docs site](https://lifterlms.com/docs/).
   We do however have a listing of [third-party LifterLMS Experts](https://lifterlms.com/experts/)
   who can be contacted to help with creating custom solutions for your needs.
 *  Plugin Support [Nick Mariano](https://wordpress.org/support/users/reddotinmotion/)
 * (@reddotinmotion)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/set-order-status-as-completed-from-php-code/#post-18263955)
 * Hi [@fizpropaganda](https://wordpress.org/support/users/fizpropaganda/),
 * As we haven’t had any response in over a week, I am going to mark this thread
   as resolved. Please reopen or post a new thread if you require further assistance.

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

The topic ‘Set order status as Completed from php code’ is closed to new replies.

 * ![](https://ps.w.org/lifterlms/assets/icon.svg?rev=2034507)
 * [LifterLMS - WP LMS for eLearning, Online Courses, & Quizzes](https://wordpress.org/plugins/lifterlms/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/lifterlms/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/lifterlms/)
 * [Active Topics](https://wordpress.org/support/plugin/lifterlms/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/lifterlms/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/lifterlms/reviews/)

 * 4 replies
 * 3 participants
 * Last reply from: [Nick Mariano](https://wordpress.org/support/users/reddotinmotion/)
 * Last activity: [1 year, 4 months ago](https://wordpress.org/support/topic/set-order-status-as-completed-from-php-code/#post-18263955)
 * Status: resolved