The function has_blocks() was introduced in version 5.0 of WordPress, hence the reason for the error in ClassicPress.
There’s no reason for this function to exist in CP as it is not block based.
As Tim says, there’s a very simple way around this - and one that fixes the problem of embeds not working.
If you’re using a child theme, in its functions.php add the following:
function remove_virtue_embed() {
remove_filter( 'embed_oembed_html', 'virtue_embed_wrap', 90, 4 );
}
add_action( 'after_setup_theme', 'remove_virtue_embed', 91 );
function cp_virtue_embed_wrap( $cache, $url, $attr = '', $post_ID = '' ) {
if ( ! function_exists( 'classicpress_version' ) ) {
if ( ! has_blocks() ) {
$cache = '<div class="entry-content-asset videofit">' . $cache . '</div>';
}
}
return $cache;
}
add_filter( 'embed_oembed_html', 'cp_virtue_embed_wrap', 91, 4 );
I was only able to test this on the free version of the theme but it worked for me. It not only got rid of the error, it restored the standard WordPress embed functionality.