Answer the question
In order to leave comments, you need to log in
How to make SMS-informing and E-mail in woocommerce?
Good evening. There is such a topic. You need SMS and E-mail informing when the client has made an order. I also have two custom meta data for the products "Seller's E-mail" and "Seller's Phone". When the client ordered the goods, the client should receive one message, and the seller another message. How can this be implemented?
Answer the question
In order to leave comments, you need to log in
Attach your function to the new order creation hook and that's it:
add_action( 'woocommerce_new_order', 'create_invoice_for_wc_order', 1, 1 );
function create_invoice_for_wc_order( $order_id ) {
$order = new WC_Order( $order_id );
$items = $order->get_items();
// etc...
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question