Need to make sure we have the array json not the object one given to use
from their site. After we store it into database go ahead and fetch it
to return the results.
$image_url = $this->feed_data->objects[0]->featured_image;
$content = $this->feed_data->objects[0]->post_body;
$url = $this->feed_data->objects[0]->published_url;
-
+
// echo '<pre>$this->feed_data: ' . print_r( $this->feed_data, true ) . '</pre>';
include_once GLM_HUBSPOT_PLUGIN_DIR . '/views/frontPage.php';
}
-
+
/**
* check_for_updates
return $this->wpdb->get_row(
$this->wpdb->prepare(
"SELECT *
- FROM {$this->hubspot_table}
- WHERE id = %d",
+ FROM {$this->hubspot_table}
+ WHERE id = %d",
1
),
ARRAY_A
'%s'
)
);
- $feed = $api_response;
+ $feed = $this->fetch_feed();
}
return $feed;
}