From 2a63149b35e045df054ee660f4a2784d6b212815 Mon Sep 17 00:00:00 2001 From: Erick Martinez <44077419+E-Rick@users.noreply.github.com> Date: Wed, 2 Jun 2021 16:01:35 -0400 Subject: [PATCH] fix(query): change source_entity_id to int from string --- article-recommendations.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/article-recommendations.php b/article-recommendations.php index bcdd231..618841b 100644 --- a/article-recommendations.php +++ b/article-recommendations.php @@ -127,7 +127,7 @@ public function widget($args, $instance) { // This is where you run the code and display the output $URL = "https://article-rec-api.localnewslab.io/recs"; - $query = "?source_entity_id='{$post_id}'&model_type={$model_type}&sort_by={$sort_by}{$exclude}"; + $query = "?source_entity_id={$post_id}&model_type={$model_type}&sort_by={$sort_by}{$exclude}"; $request_url = $URL . $query; $response = wp_remote_retrieve_body ( wp_remote_get( $request_url ) ); @@ -318,4 +318,4 @@ public function update( $new_instance, $old_instance ) { } // Class article_recommendations ends here -?> \ No newline at end of file +?>