handling rating properly
This commit is contained in:
parent
f218280d0b
commit
b710fcd5fd
|
|
@ -360,12 +360,13 @@ function lhoist_post_rating(WP_REST_Request $request)
|
|||
$cleanDatas = lhoist_sanitize_ratings_datas($datas);
|
||||
lhoist_check_ratings_datas_formats($cleanDatas);
|
||||
|
||||
|
||||
global $wpdb;
|
||||
$datetime = new DateTime("now", new DateTimeZone('Europe/Brussels'));
|
||||
|
||||
$ratingsDatas = array(
|
||||
'comment' => "super",
|
||||
'rating' => 3,
|
||||
'rating' => $cleanDatas['note'],
|
||||
'comment' => $cleanDatas['comment'] ?? '',
|
||||
'date' => $datetime->format('Y-m-d H:i:s'),
|
||||
);
|
||||
$table_name = 'wp_app_ratings';
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user