Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
add_filter('bp_course_rest_prepare_course',function($response, $course, $request){
if(!empty($response->data['course']['price_html']) && is_array($response->data['course']['price_html'])){
foreach ($response->data['course']['price_html'] as $key => $value) {
$response->data['course']['price_html'][$key]['link'] = 'http://google.com';
}
}else{
$response->data['course']['price_html']['link'] ='http://google.com';
}
return $response;
},10,3);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment