I am using this to create a new function in my functions.php
file
add_action( 'woocommerce_new_order', 'create_invoice_for_wc_order', 1, 1 );
function create_invoice_for_wc_order() {
}
it is to execute some custom code when a new order is placed, how can i get the order information (ordered products etc) inside my function
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…