---
title: Hide Strike Out Price in WooCommerce Shop and Product Pages
url: https://sukeshdas.com/how-to-hide-striked-out-price-on-product-and-shop-page-on-woocommerce/
description: Hide strike out price in WooCommerce and show only the sale price on shop and product pages, with a short code snippet you add to your theme.
---

[Home](https://sukeshdas.com/)[Blog](https://sukeshdas.com/blog/)[Tips & Tricks](https://sukeshdas.com/category/tips-tricks/)

# How to hide striked out price on Product and Shop page on woocommerce?

By Sukesh Das January 29, 2021 1 min read

![WooCommerce product page showing a struck-out price from dynamic pricing](https://sukeshdas.com/wp-content/uploads/2021/01/WooCommerce-Dynamic-Pricing-Display-StrikeOut-Product-Page.png)

When you apply discount to product(s), WooCommerce, by default, shows the sale price with regular price stricken out. This characteristic can be seen in shop page, product page, cart page as well as checkout page. With the code snippet given below, you can choose to hide striked out price on product, shop and category page, with the help of our **Dynamic Pricing and Discounts plugin for WooCommerce** .

### Code snippet to hide strike out price on product and shop page

```
add_filter('woocommerce_get_price_html', "xa_only_sale_price", 99, 2);

function xa_only_sale_price($price, $product)
{
    if(!is_cart() && !is_checkout() && !is_ajax()){
        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());
}
```

Following is a screenshot of how the product price will be shown on product page.![WooCommerce Dynamic Pricing and Discounts | Price display in Product page](https://cdn.elextensions.com/wp-content/uploads/2018/09/WooCommerce-Dynamic-Pricing-Display-StrikeOut-Product-Page.png)

Price display in Product page

Following is a screenshot of how the price will be shown on cart page.

![WooCommerce Dynamic Pricing and Discounts | Price display in Cart page](https://cdn.elextensions.com/wp-content/uploads/2018/09/WooCommerce-Dynamic-Pricing-Display-StrikeOut-Cart-Page.png)

Related service

[WordPress website development](https://sukeshdas.com/services/wordpress-web-design/)

Custom WordPress sites on a lightweight theme, with the block editor set up the way you will actually use it and only the plugins you need.

[See the service](https://sukeshdas.com/services/wordpress-web-design/) [Case study: Novelia Fashion](https://sukeshdas.com/project/novelia-fashion/)

Share this article

![Sukesh Das](https://sukeshdas.com/wp-content/uploads/2026/09/profile-Sukesh-Das-150x150.webp)

Written by Sukesh Das

Web designer and developer with 1,200+ sites built. If this article describes your problem, I can fix it for you.

 [Ask me about your site](https://sukeshdas.com/contact-us/)

## Start the discussion [Cancel reply](/how-to-hide-striked-out-price-on-product-and-shop-page-on-woocommerce/?format=md#respond)

Browse topics Tips & Tricks

- [Website & Conversion12](https://sukeshdas.com/category/website-conversion/)
- [Squarespace8](https://sukeshdas.com/category/squarespace/)
- [Lead Generation6](https://sukeshdas.com/category/lead-generation/)
- [SEO & Local SEO6](https://sukeshdas.com/category/seo-local-seo/)
- [Tutorial6](https://sukeshdas.com/category/tutorial/)
- [Wordpress3](https://sukeshdas.com/category/wordpress/)
- [Divi2](https://sukeshdas.com/category/tips-tricks/divi/)
- [AI Search2](https://sukeshdas.com/category/ai-search/)
- [Email Marketing2](https://sukeshdas.com/category/email-marketing/)
- [Elementor1](https://sukeshdas.com/category/tips-tricks/elementor/)
- [All articles](https://sukeshdas.com/blog/)

Want this handled for you?

Send a short brief and get a fixed quote.

 [Get a free quote](https://sukeshdas.com/contact-us/)

Keep reading

## More from the *blog.*

[All articles](https://sukeshdas.com/blog/)

Tips & Tricks Oct 11, 2026

### [HandyMCP: The Free WordPress MCP Server Plugin I Built for Claude, ChatGPT and Cursor](https://sukeshdas.com/wordpress-mcp-server-plugin/)

I built HandyMCP, a free WordPress MCP server plugin, so Claude, ChatGPT, Cursor and Claude Code…

Tips & Tricks Oct 4, 2026

### [How to Find Out What a Website Is Built With (Free Chrome Extension)](https://sukeshdas.com/what-is-this-website-built-with/)

I built Undersite to replace the pile of extensions and lookup sites I used to check…

Lead Generation Oct 3, 2026

### [Floating WhatsApp Button: Free Chat Widget Code for Any Website (6 Platforms)](https://sukeshdas.com/free-floating-whatsapp-button/)

Add a free floating WhatsApp button to any website with one copy-paste code: settings for number,…


<!-- Page uncached by LiteSpeed Cache 7.9.1 on 2026-10-21 14:10:26 -->