I'm looking at adding some php code to my product page. I'm looking at embedding a widget below the 'Add to cart' button (see attached image). However, I can't find the file in theme editor to do this. Where is it located and what is it called?
Single product page is constructed in multiple templates, each of them containing different section and each section containing different content. So based on your screenshot if you want to add something below the "Add to Cart" button you can simply do it with this custom PHP code:
function my_widget_on_single_product_page() {
// You custom code here
}
add_action( 'woocommerce_single_product_summary', 'my_widget_on_single_product_page', 60 );
Hi,
I'm looking at adding some php code to my product page. I'm looking at embedding a widget below the 'Add to cart' button (see attached image). However, I can't find the file in theme editor to do this. Where is it located and what is it called?
Thank you in advance,
Phil
Hi Phil,
Single product page is constructed in multiple templates, each of them containing different section and each section containing different content. So based on your screenshot if you want to add something below the "Add to Cart" button you can simply do it with this custom PHP code:
I hope this will help you.Thank you Arlind for the prompt reply. My issue has been solved!
Dear Phil,
I am glad that this issue is solved on your side. Will close this ticket now, and if you have further questions feel free to create another ticket.