Support » Plugin: WooCommerce » Replace Price with link

Viewing 2 replies - 1 through 2 (of 2 total)
  • I’ve got this half figured out now…

    I can remove the displayed price using the code remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_price', 10 ); in my functions.php file

    Now if someone could tell me what I need to stick in there to echo a link I’d be extremely grateful. Thanks!!

    For anyone who stumbles across this, I achieved what I was looking for with the code:

    function woocommerce_template_single_price(){
      echo '<a href="#">Request a sample</a>';
    }

    There’s probably another way to do it, but since I don’t care about reusing the $price variable this worked well for me.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Replace Price with link’ is closed to new replies.