• Resolved arwinvdv

    (@arwinvdv)


    When creating a order by code like this

    $checkout = WC()->checkout();
    $customer = new WC_Customer( $current_user_id );
    $order_id = $checkout->create_order( [
      'billing_email'  => $customer->get_billing_email(),
      'payment_method' => "sepa",
    ] );

    The default stock quantity is not updated because in class-slw-order-item.php the $current_page is checked. I have now a workaround to set the $current_page, but its maybe better to implement the hook woocommerce_checkout_order_created

Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Stock not updated’ is closed to new replies.