This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if ( ! defined( 'ABSPATH' ) ) { | |
die; | |
} | |
function pll_sync_store_rating($post_id, $translation_id, $new_avg_rating, $new_vote_count, $submitted_rating) { | |
// Update rating sum | |
$new_ratings_sum = $submitted_rating; | |
if ( $new_vote_count > 1) { | |
$new_ratings_sum = get_post_meta($post_id, 'rmp_rating_val_sum', true); |