code: public function set_total_votes( $post_id, $votes ) {
  
  		$votes = json_encode( $votes, true );
  
  		if ( ! add_post_meta( $post_id, 'imdbTotalVotes', $votes, true ) ) {
  			update_post_meta( $post_id, 'imdbTotalVotes', $votes );
  		}
  	}
docs: Set total votes.
  
  @since 1.0.1
  
  @param string $post_id → post id.
  @param array  $votes  → votes.