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)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Creating WooCommerce Order’ is closed to new replies.