[insert_php]
add_action(‘wp_footer’, ‘googleSchemaCode’, 100);
function googleSchemaCode() {
print ‘

‘ . file_get_contents(‘https://www.shopperapproved.com/feeds/schema.php/?siteid=22906&token=NpWLgVSfJsn5Cbj’) . ‘

‘;
}
ini_set(‘default_socket_timeout’, 2);
$min = date(‘Y-m-d’, strtotime(‘-10 day’));
$max = date(‘Y-m-d’, strtotime(‘1 day’));
$ch = curl_init(‘https://www.shopperapproved.com/api/reviews/?siteid=22906&token=NpWLgVSfJsn5Cbj&from=’ . $min . ‘&to=’ . $max . ‘&sort=newest&page=0’);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 3);
$response = curl_exec($ch);
$reviews = json_decode($response);
print ‘

‘;
foreach ($reviews as $key => $value) {
print ‘

‘;
print ‘

‘;
print ‘

‘ . date(‘F j, Y’, strtotime($value->displaydate)) . ‘ – ‘ . $value->name . ($value->justlocation ? ‘ (‘ . $value->justlocation . ‘)’ : ”) . ‘

‘;
print ‘

“‘ . $value->textcomments . ‘”

‘;
print ‘

‘;
print ‘

‘;
}
print ‘