How to print text from functions.php in your theme
-
Hi team, I want to print a specific text when a product has no price… but the code I always use doesn’t work for me because in your template the product template is made with elementor.
How can I print this text in your theme, in the child theme’s functions.php class?
/* Put a contact button for products without a price */
add_action( ‘woocommerce_single_product_summary’, ‘boton_sub_producto_single’, 5 );
function boton_sub_producto_single() {
echo “<br>…producto…”;
}
Thanks!
Hello,
Navigate to Dashboard -> Layouts -> Single product -> edit your product template and define the “WooCommerce Hook” element with the hook for which you define your custom.
Kind Regards