Crossed out pricing modification – Dynamic pricing

Viewing 1 reply thread
  • Author
    Posts
    • #54938
      Anonymous
      Inactive

      Using Dynamic Pricing and Discounts plugin ver 3.1.1
      Anyone know how to remove the crossed out pricing in the product pages?
      I’ve seen a post on here about how to change a variable product from a range ($100-$300) to “Start from $100”, but I would like to not have the crossed out pricing on the page at all.
      When someone views the product page, if I have the tables activated in the plugin, the discounted pricing will be shown there.
      Thank you

    • #54967
      Anonymous
      Inactive

      Hi Holli,

      This snippet will hide crossed out price in all pages of the shop.
      add_filter(‘woocommerce_get_price_html’, “xa_only_sale_price”, 99, 2);

      function xa_only_sale_price($price, $product)
      {
      if ($product->is_type(‘simple’) || $product->is_type(‘variation’)) {
      return regularPriceHTML_for_simple_and_variation_product($price, $product);
      }
      return $price;
      }

      function regularPriceHTML_for_simple_and_variation_product($price, $product){
      return wc_price($product->get_price());
      }

      Kindly try this.

Viewing 1 reply thread
  • You must be logged in to reply to this topic.