Tagged: 

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #224121

    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

    #224145

    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

    #224153

    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!

    #224268

    Hi!

    Can you please post a screenshot of what you’re trying to do?

    Regards,
    Ismael

    #224278

    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

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.