Title: Change the Order customer programtically
Last modified: November 25, 2019

---

# Change the Order customer programtically

 *  [adambushell](https://wordpress.org/support/users/adambushell/)
 * (@adambushell)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/change-the-order-customer-programtically/)
 * I need to let users “Gift” courses to other people and so far ive been able to
   create a woocommerce user at the ‘woocommerce_checkout_update_order_meta’ stage
   with the gift recipients details HOWEVER im unable to assign this user as the
   customer of the newly created lp_order post type that is created within orders.
 * I have tried every hook, every mention of userid within learnpress and hard code
   in an id to give me a direction but nothing seems to change the assigned user
   to an lp_order on creation. Any advise?

Viewing 1 replies (of 1 total)

 *  [hadam](https://wordpress.org/support/users/hadam3003/)
 * (@hadam3003)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/change-the-order-customer-programtically/#post-12184103)
 * Hi adambushell,
 * I don’t get your mind about ” users “Gift” courses to other people”. Can you 
   say more clearly about it?

Viewing 1 replies (of 1 total)

The topic ‘Change the Order customer programtically’ is closed to new replies.

 * ![](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/)

 * 1 reply
 * 2 participants
 * Last reply from: [hadam](https://wordpress.org/support/users/hadam3003/)
 * Last activity: [6 years, 5 months ago](https://wordpress.org/support/topic/change-the-order-customer-programtically/#post-12184103)
 * Status: not resolved