0
votes

i am working on woocommerce project and facing one problem that i have copied all templates from plugin to my custom theme but now i have single html page which need to add integrate in content-single-product.php as there are some hooks like

do_action( 'woocommerce_single_product_summary' );
do_action( 'woocommerce_after_single_product_summary' );
do_action( 'woocommerce_after_single_product' );

but this return complete data in its own div structure but i just want to add single single elements in different div structure and custom classes for example for image i just want to show simple image without magnifies effect or any other class.

similarly there are some variants with some product so default its show properly but whan i try to add any hook its don't shows i have just added this hooks

add_action( 'woocommerce_single_variation', 'woocommerce_single_variation_add_to_cart_button', 20 );
add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_price', 10 );

but nothing happen please tell me how to add it in content-single-product.php so all product related data i can print i custom div's with custom classes like when i trying to show variants than its did not show and if its shows than after changing the variants price should also change please help me in this problem how i intigrate my own html page in this single product so all default functionality should also work with my design and how to add hooks or action in this page or if i am wrong please tell me where to add thiese actions hooks and how

Thanks

1

1 Answers

0
votes

Hey Deepak i hope you are well this is a very broad question but within the single-product folder you have all the elements on a single product page for example title and product image editing all the woocommerce templates is not the best practice you maybe making things harder for yourself updating things.

creating your own functions with filters and hooks will give you a much more future prove way of working. heres a link to a visual guide for the single product page here

removing the existing functions and adding your own is what you are looking but without know exactly what you need its hard to help please write some code and we can help