Skip to content

Commit bd7d048

Browse files
committed
update rest endpoint
1 parent 2416b76 commit bd7d048

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

classes/rest/class-stats.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,12 +162,12 @@ public function get_stats( \WP_REST_Request $request ) {
162162
foreach ( $ravis_recommendations as $recommendation ) {
163163
$r = [
164164
'id' => $recommendation->task_id,
165-
'title' => $recommendation->title,
165+
'title' => $recommendation->post_title,
166166
'url' => $recommendation->url,
167-
'provider_id' => $recommendation->provider_id,
167+
'provider_id' => $recommendation->get_provider_id(),
168168
];
169169

170-
if ( 'user' === $recommendation->provider_id ) {
170+
if ( 'user' === $recommendation->get_provider_id() ) {
171171
$r['points'] = (int) $recommendation->points;
172172
}
173173
$data['recommendations'][] = $r;

0 commit comments

Comments
 (0)