$order->get_shipping_total() // доставка
$order->get_subtotal() //стоимость товаров
add_action( 'woocommerce_new_order', 'wpp_create_invoice_for_wc_order', 10, 1 );
function wpp_create_invoice_for_wc_order( $order_id ) {
$order = new WC_Order( $order_id );
$queryData = http_build_query(array(
'fields' => array(
'TITLE' => "Заказ с сайта №",
'NAME' => $order->get_billing_first_name(),
),
'params' => array("REGISTER_SONET_EVENT" => "Y")
));
};
$order->get_billing_email()