Home Forums Themes Support Gecko Woocommerce: Add Price Suffix with Hyperlink!

Viewing 1 reply thread
  • Author
    Posts
    • #13297

      Hey,Hey,
      is it possible to add a Hyperlink to the Price Suffix of WooCommerce?
      To add a Suffix, I used this Code in functions.php

      add_filter( ‘woocommerce_get_price_html’, ‘custom_price_suffix’, 100, 2 );        function custom_price_suffix( $price, $product ){        $price = $price . ‘zzgl. Versandkosten’ ;            return apply_filters( ‘woocommerce_get_price’, $price );    }

      to Show the Text “zzgl. Versandkosten”. I want to add a Hyperlink to “zzgl. Versandkosten” where Customers can read a PDF Documentation about our Shipping prices.

      Thanks

      Mauro

    • #13328

      Hi Mauro,

      Just change the code like this

       

      add_filter( 'woocommerce_get_price_html', 'custom_price_suffix', 100, 2 );
      function custom_price_suffix( $price, $product ) {
      	$price = $price . '<a href="your_link_here">zzgl. Versandkosten</a>';
      	return apply_filters( 'woocommerce_get_price', $price );
      }
Viewing 1 reply thread

You must be logged in to reply to this topic.