Support » Plugin: WooCommerce » Creating WooCommerce Order

  • Resolved jenny360transformation



    I’m using Woocomerce to manage my products, but let the user pay through 3rd party service.

    I’m trying to create new order manually, and assign it to the current user. I’m using $order = wc_create_order(); in order to create the order. The order is indeed created, but the fololwing code does nothing:

    $order->set_address( $address, ‘billing’ );
    $order->update_status(“Completed”, ‘Imported order’, TRUE);

    In addition, I can’t find a way to assign the current user to the new order. apply save() to the $order object doesn’t help as well.

    The admin can see what was ordered (I’ve used add_product()) but not by whom, and the user can’t see his orders at all.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support RK


    This is a fairly complex development topic. I’m going to leave it open for a bit to see if anyone is able to chime in to help you out.

    I can also recommend the following places for more development-oriented questions:
    * WooCommerce Slack Community:
    * Advanced WooCommerce group on Facebook:

    Plugin Support Hannah S.


    Automattic Happiness Engineer

    We haven’t heard back from you in a while, so I’m going to mark this as resolved – if you have any further questions, you can start a new thread.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Creating WooCommerce Order’ is closed to new replies.