Hi I have a simple code below that fetches, make, model and year from the database, but for some weird reason I get:
Fatal error: Cannot access protected property error, any ideas as to why this might be happening? (i btw have this code on a different server running with no issues.)
$count = 0;
foreach( $_product->getFitModels() as $fit ) {
$trimmedData = ' '.$fit->row->make.' '.$fit->row->model.' '.$fit->row->year;
$tempMMYArray[] = $trimmedData;
}