Replace term archives with static pages

I think this should work if library functions are used everywhere.

function custom_term_archive_link($url, $term, $taxonomy) {
    if($taxonomy != 'product_cat') { return $url;}

    if( $term->name == 'my_term' ) {
        $url="my_term_static_url";
    }

    return $url;
}
add_filter('term_link', 'custom_term_archive_link', 99, 3);