The 'shipping_address' is displaying an error "Notice: Array to string conversion", I have this line of code:
EDIT -- Removed code snippet and replacing it with the full code connecting to BigCommerce store
<?php
require 'vendor/autoload.php';
use Bigcommerce\Api\Client as Bigcommerce;
Bigcommerce::configure(array(
'store_url' => 'xxx',
'username' => 'xxx',
'api_key' => 'xxx'
));
$ping = Bigcommerce::getTime();
$orders = Bigcommerce::getOrders();
$data = json_decode($shipping_address, true);
foreach ($orders as $orders) {
echo "<table border='1' width='100%' cellspacing='0' cellpadding='5' bordercolor='#000' style='border-bottom:0;'>
<tr>
<th width='15%'>Barcode</th>
<th width='7%'>Order date</th>
<th width='23%'>Customer details</th>
<th width='8%'>Phone #</th>
<th width='22%'>Total</th>
<th width='15%'>Comments</th>
<th width='10%'>Signature</th>
</tr>";
echo "<tr>";
echo "<td style='text-align:center;'>" $orders->id . "</td>";
echo "<td>" . $orders->date_created . "</td>";
echo "<td>" . $shipping_address = $orders['shipping_address'][0]['first_name'] . "</td>";
echo "<td>" . $orders->phone . "</td>";
echo "<td style='text-align:center;'>" . $orders->total_inc_tax . "</td>";
echo "<td>" . $orders->customer_message . "</td>";
echo "<td>" . "</td>";
echo "</tr>";
echo "</table>";
}
?>
$orders->shipping_addressesis array, not string