Reputation:
I need to modify my WooCommerce orders page but I don't have the experience for this. At the moment (like in normal case) my orders page looks like this:
Yesterday I've added a second id attribute to each order where I can set a custom customer id (user_id in Wordpress). This field is named "second_customer".
I'm doing this because I want to show the order taken by customer one to an other customer too in case the "second_customer" has his user_id as value.
Now I need to modify the orders.php and modify it so that the orders gets loaded to for the "second_customer" on his account and the normal way too. So my question is: How can I get exacly the row like in the picture (the order) for the user id defined in my custom attribute?
Upvotes: 0
Views: 242
Reputation: 298
As your question: How can I get exacly the row like in the picture use the table HTML elements like will result like the screen shoot above with 5 headings rows with table headings- and table rows- :
<table style="width:100%">
<tr>
<th>Product Id</th>
<th>Date</th>
<th>Status</th>
<th>Address</th>
<th>Name</th>
</tr>
<tr>
<td>#356</td>
<td>30 September</td>
<td>Customer</td>
<td>10 Address st, China</td>
<td>John Doe</td>
</tr>
<tr>
<td>#357</td>
<td>30 September</td>
<td>Customer</td>
<td>32 Address st, Porland</td>
<td>Sarah smith</td>
</tr>
<tr>
<td>#358</td>
<td>29 September</td>
<td>Customer</td>
<td>55 Address st, New York</td>
<td>Ben Barber</td>
</tr>
</table>
Upvotes: 1