Tagged: enfold
Hi – I would really like to use a filter / hook (still don’t have my head around these 100%) to add 2 unique text elements under the Add to Cart button.
Can you help with that?
I’m using this filter to add “Per Person” to the price above the pricing section
`add_filter( ‘woocommerce_get_price_html’, ‘custom_price_message’ );
function custom_price_message( $price ) {
$vat = ‘ (Per Person)’;
return $price . $vat;
}’
Thanks,
John
Hi sundialstudios!
You can find a list of all the WooCommerce hooks and filters in their docs here: http://docs.woothemes.com/document/hooks/
Regards,
Devin
Thanks!
I’ve seen that page on WooCommerce before. Is there a trick to figure out which element is which on the page? Driving me insane!
Hey!
You can look in the WooCommerce template folder and find the section you are looking to add content to. The filter/actions are listed in the php as outputs if you want to try and pick out a specific spot to try and hook into.
If the that doesn’t make sense then I would suggest looking into a freelance developer who can do so and then write the function(s) as needed.
Cheers!
Devin