2
\$\begingroup\$

I inserted this code snippet in the functions.php of my child theme, to create the woocommerce single product page in the hook woocommerce_after_single_variation of the custom icons in line centered on the text, without using css, everything works, but I ask you much more experienced if that's okay, or could you do better? thank you so much ( sorry my poor english, i use translate :)

/**
 * added 3 icons in line to the single product page
 */

 add_action( 'woocommerce_after_single_variation', 'icone_rassicurazione_cliente');
 function icone_rassicurazione_cliente() { 
    echo '<i class="fas fa-undo" style="font-size:40px; text-align:center; border-radius:20px margin-left: 0 auto; margin-right: 5%;">
             <p style="text-align: center;">
               <h6>reso  gratuito<br>antro 90 gg</h6></i>' ;

    echo '<i class="fas fa-phone-volume" style="font-size:40px; text-align:center; border-radius:20px margin-left: 5%; margin-right:5%;">
             <p style="text-align: center;">
               <h6>assistenza anche<br>tramite whatsapp</h6></i>' ;

    echo '<i class="fab fa-cc-paypal" style="font-size:40px; text-align:center; border-radius:20px margin-left: 5%; margin-right: 0 auto;">
             <p style="text-align: center;">
               <h6>pagameni certificati<br>Paypal, carta di</h6></i>' ;

}
\$\endgroup\$

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.