I created a custom field for the short description with acf custom field, which is correctly displayed on the product page. However, if I go to the product comparison page it is not shown, how can I do to show it on that page too?
function descrizione_alternativa($desc){
global $product;
if ( is_single( $product->id ) )
if(! $desc){
if ( have_rows( 'Caratteristiche motosega' ) ){
echo '<ul>';
while ( have_rows('Caratteristiche motosega' ) ) : the_row();
echo '<li>'.'Cilindrata: '.'<strong>'. get_sub_field('cilindrata'). '</strong>' .'</li>';
echo '<li>'.'Potenza: '.'<strong>'. get_sub_field('cilindrata'). '</strong>' .'</li>';
echo '<li>'.'Lunghezza barra: '.'<strong>'. get_sub_field('lunghezza_barra'). '</strong>' .'</li>';
echo '<li>'.'Peso a secco: '.'<strong>'. get_sub_field('peso_a_secco'). '</strong>' .'</li>';
endwhile;
echo '</ul>';
}
}else{
return $desc;
}
}
add_filter( 'woocommerce_short_description', 'descrizione_alternativa' );