Seems like the solution I was looking for was !in_the_loop()
Full:
add_filter( 'the_title', 'custom_account_endpoint_titles', 10, 2 );
function custom_account_endpoint_titles( $title ) {
if (is_shop() && !in_the_loop() && ! is_admin() && ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX )) {
return 'Shop - Parure.co';
}
}
Note: the !is_admin
and !DOING_AJAX
functions are to prevent this from affecting product titles in the admin panel