title: Customize WooCommerce single products but not on other product loops
body: <p>I've got some custom code in my woocommerce price hook and it makes the change everywhere on the site. I'd like to only have it affect the product page (all of our products are simple products currently).</p>
  <p>While designing the product collections page the same snippet below is showing up there that shows up on the product page. I tried to apply an if statement to only make the change to woocommerce_format_sale_price when it was on a product page, but that doesn't seem to have worked.</p>
  <p>Any advice?</p>
  <pre><code>function add_discount_woocommerce_format_sale_price( $price, $regular_price, $sale_price ){
      $percentage = round( ( $regular_price - $sale_price ) / $regular_price * 100 ).'%';
  
      $price = '&lt;ins&gt;' . ( is_numeric( $sale_price ) ? wc_price( $sale_price ) : $sale_price ) . '&lt;/ins&gt; &lt;del&gt;' . ( is_numeric( $regular_price ) ? wc_price( $regular_price ) : $regular_price ) . '&lt;/del&gt;&lt;br&gt;&lt;span class=&quot;plan-atc&quot;&gt;*Payment Plan Available at Checkout&lt;/span&gt;&lt;br&gt; &lt;span class=&quot;below-atc&quot;&gt;Add to cart today, get ' . $percentage . __( ' off &lt;/span&gt;', 'text-domain' );
      return $price;
  }
  add_filter( 'woocommerce_format_sale_price', 'add_discount_woocommerce_format_sale_price', 99, 3 );
  </code></pre>
  <p>Thanks!</p>