In this case you just need a conditional tag inside of the wp_head
action. Placing the following on your functions.php
will solve the problem:
add_action( 'wp_head', 'q166556_taxonomy_head' );
function q166556_taxonomy_head(){
// Conditional for Taxonomy archives and posts that have any term from the taxonomy `store`
if ( ! has_term( '', 'store' ) && ! is_tax( 'store' ) ){
return;
}
echo '<link rel="alternate" hreflang="fr" href="http://www.domain.com/fr" />';
}