Added customer's billing and shipping data to paypal checkout fields

This commit is contained in:
2025-10-06 21:41:22 +02:00
parent be64c0484e
commit 5df46cba7e
5 changed files with 116 additions and 20 deletions

View File

@@ -34,13 +34,25 @@ const OrderSummary = ({ orderData, loading, order }) => {
<DataList.ItemValue>{orderData.wc_order_id}</DataList.ItemValue>
</DataList.Item>
{ order.billing !== undefined && <>
{/*<DataList.Item pt="4">*/}
{/* <DataList.ItemLabel>First Name</DataList.ItemLabel>*/}
{/* <DataList.ItemValue>{order.billing.first_name}</DataList.ItemValue>*/}
{/*</DataList.Item>*/}
{/*<DataList.Item pt="4">*/}
{/* <DataList.ItemLabel>Last Name</DataList.ItemLabel>*/}
{/* <DataList.ItemValue>{order.billing.last_name}</DataList.ItemValue>*/}
{/*</DataList.Item>*/}
<DataList.Item pt="4">
<DataList.ItemLabel>First Name</DataList.ItemLabel>
<DataList.ItemValue>{order.billing.first_name}</DataList.ItemValue>
</DataList.Item>
<DataList.Item pt="4">
<DataList.ItemLabel>Last Name</DataList.ItemLabel>
<DataList.ItemValue>{order.billing.last_name}</DataList.ItemValue>
<DataList.ItemLabel>Shipping details</DataList.ItemLabel>
<DataList.ItemValue>
{order.shipping.first_name} {order.shipping.last_name}<br />
{order.shipping.address_1}
{order.shipping.address_2 && `, ${order.shipping.address_2}`}
{`, ${order.shipping.city}`}
{`, ${order.shipping.postcode}`}
{order.shipping.state && `, ${order.shipping.state}`}
{`, ${order.shipping.country}`}
</DataList.ItemValue>
</DataList.Item>
<DataList.Item pt="4">
<DataList.ItemLabel>E-mail</DataList.ItemLabel>