'How to get the order number after submitting the "buy in 1 click" form
I have a 1-click purchase plugin for wordpress. When a client enters a name and email, an order is created in the admin panel. How to display the order number for client in a modal window after placing an order? I have a code that creates an order. It generates an order number after submitting the form. I don't understand how to catch him.
$order = wc_create_order();
do_action( 'awooc_after_created_order', $product_id, $order, $address, $product_qty );
$this->add_order( $order, $product_id, $product_qty, $address );
$this->change_subject( $contact_form, $order );
do_action( 'awooc_after_mail_send', $product_id, $order->get_id() );
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
