If you are using a shortcode, the temporary workaround would be to use the pvc_post_views_html filter like this:
add_filter( 'pvc_post_views_html', 'custom_pvc_post_views_html', 10, 5 );
/**
* It replaces the number of views in the Post Views Counter plugin with the number of views in the
* Post Views plugin
*
* @param html The HTML to be filtered.
*
* @return the html.
*/
function custom_pvc_post_views_html( $html ) {
if ( ! function_exists( 'pvc_get_post_views' ) ) {
return $html;
}
$views = pvc_get_post_views();
$html = preg_replace( '/<span class="post-views-count">(.*?)<\/span>/', '<span class="post-views-count">' . $views . '</span>', $html );
return $html;
}
The alternative option would be to use the pvc_get_post_views() function instead of do_shortcode() and pass a post ID to it.