Added visualisation
Added return and cancel URL's
This commit is contained in:
@@ -254,7 +254,23 @@ router.get('/order-status/:wc_order_id', async (req, res) => {
|
||||
total: wcOrder.order.total,
|
||||
currency: wcOrder.order.currency,
|
||||
payment_method: wcOrder.order.payment_method,
|
||||
payment_method_title: wcOrder.order.payment_method_title
|
||||
payment_method_title: wcOrder.order.payment_method_title,
|
||||
line_items: wcOrder.order.line_items.map(item => ({
|
||||
name: item.name,
|
||||
quantity: item.quantity,
|
||||
price: item.price,
|
||||
total: item.total,
|
||||
image: item.image?.src || null
|
||||
})),
|
||||
shipping: {
|
||||
total: wcOrder.order.shipping_total,
|
||||
method: wcOrder.order.shipping_lines[0]?.method_title
|
||||
},
|
||||
billing: {
|
||||
first_name: wcOrder.order.billing.first_name,
|
||||
last_name: wcOrder.order.billing.last_name,
|
||||
email: wcOrder.order.billing.email
|
||||
}
|
||||
});
|
||||
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user