March 2020
Beginner
660 pages
18h 28m
English
The Add to Cart button is loaded within the woocommerce_after_single_product_summary action. It will be the last element in the product summary section unless we have meta information for it. So, we implemented this hook with a callback function called wpccp_woocommerce_single_product_summary_data. Inside this function, we just returned the content we wanted to display. The important thing is the use of the priority parameters for the hook. In this case, we set it to 70 to make it display at the end of the summary section. Let's take a look at the following comments section, which has been extracted from the content-single-product.php template:
* @hooked woocommerce_template_single_title ...
Read now
Unlock full access