php - access order details when admin creates new order woocommerce

551

This hook can be used to access order_details after checkout.

add_action('woocommerce_thankyou', array($this,'save_order_data'), 10);

public function save_order_data( $order_id) {
    $order = wc_get_order( $order_id );
    echo "<pre>Order id is".$order_id."</pre>";
}

But how could i access the same when order is created in back-end (admin side)? I couldn't find any hook ? Or is there any common hook that can be accessed even if order is placed from back-end or front end

People are also looking for solutions to the problem: php - Dynamic insert multiple rows in SQL server

Source

Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.