Did the Updated Earlier This Year Change How Reviews Functions Are Created?
-
Did this plugin change the way it creates a reviews via functions earlier in the year?
I was grabbing data from another source and adding it to the reviews but that doesn’t seem to work anymore. Here was my code:
// Add Reviews for Site Reviews wordpress Plugin foreach($result->reviews as $data) { $review = apply_filters('glsr_create_review', false, [ 'assign_to' => $post_id, 'content' => $data->text, 'date' => date("Y-m-d", $data->time), 'name' => $data->author_name, 'rating' => $data->rating, 'title' => $data->author_name.' '.$data->name, ]); } print_r(json_decode($post_id));
This worked earlier this year. I can’t remember what the previous documentation said so after looking at the current documentation, I tried changing the code to this:
'assigned_posts' => $post_id,
and this:
'assigned_posts' => $post->ID,
But neither of those seemed to work. Was ‘assign_to’ used previously or is my issue somewhere else?
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
- The topic ‘Did the Updated Earlier This Year Change How Reviews Functions Are Created?’ is closed to new replies.