Skip to content
The #1 WooCommerce product filter. 70,000+ shops run it.4.8 / 5 (325 reviews)70,000+ storesFree since 2018V4.0 is here

How To WooCommerce

How To Remove Sale Price from WooCommerce Product Page

If you’re looking to create a more streamlined and consistent shopping experience on your WooCommerce store, you might want to remove the sale price from the product page. Whether it’s for promotional reasons or to maintain a uniform pricing structure, removing the sale price can be a simple task if you know the right steps.

In this comprehensive guide, we’ll walk you through the process of removing the sale price from your WooCommerce product pages.


Why Remove Sale Price from WooCommerce Product Pages?

Removing the sale price from your WooCommerce product pages can have several benefits:

  • Maintain Consistency: If your store’s design leans towards simplicity, having a single price displayed can enhance the overall look and feel.

  • Avoid Confusion: Multiple price displays might confuse customers. A single price point ensures clarity.

  • Strategic Marketing: You may want to highlight sales differently, such as through banners or pop-ups, instead of using the default sale price display.


Steps to Remove Sale Price from WooCommerce Product Pages

You can remove the sale price using custom code or plugins. Here’s a step-by-step guide using custom code.

Step 1: Access Your WordPress Dashboard

Log into your WordPress dashboard, your control center for managing all aspects of your WooCommerce store.

Step 2: Backup Your Website

Before making any changes, it’s crucial to backup your website. This ensures that you can restore your site in case anything goes wrong.

Step 3: Navigate to the Theme Editor

  • Go to Appearance > Theme Editor.

  • On the right-hand side, locate and click on the functions.php file. This is where you will add the custom code.

Step 4: Add Custom Code

Insert the following code into the functions.php file to remove the sale price:

add_filter('woocommerce_get_price_html', 'remove_sale_price', 100, 2);function remove_sale_price($price, $product) {

// Check if the product is on sale
if ($product->is_on_sale()) {

// Get the regular price
$regular_price = $product->get_regular_price();

// Return only the regular price
return wc_price($regular_price);
}

return $price;
}

Step 5: Save Changes

Click on the Update File button to save your changes. This ensures that only the regular product price is displayed on your WooCommerce product pages, effectively removing the sale price.

Step 6: Clear Cache and Test

  • Clear Cache: If you are using a caching plugin, clear the cache to ensure the changes are reflected on your site.

  • Test Your Site: Visit your product pages to verify that the sale price has been successfully removed.


Alternative Method: Use a Plugin

If you’re not comfortable editing code, consider using a plugin to achieve the same result. Plugins like Code Snippets allow you to add custom code without directly modifying your theme files.

Using the Code Snippets Plugin

  1. Install and activate the Code Snippets plugin from the WordPress repository.

  2. Navigate to Snippets > Add New.

  3. Name your snippet and paste the code from Step 4 into the code area.

  4. Save and activate the snippet.


Conclusion

Removing the sale price from your WooCommerce product pages can help you create a more cohesive and straightforward shopping experience. By following the steps outlined in this guide, you can easily customize your store’s appearance and ensure that your pricing strategy aligns with your business goals.

Whether you choose to add custom code directly or use a plugin, the process is straightforward and can significantly enhance your store’s user experience.

Remember: Always backup your website before making any changes, and test thoroughly to ensure everything works as expected. With these steps, you’re well on your way to optimizing your WooCommerce product pages for a cleaner, more professional look.

Leave a Reply

Your email address will not be published. Required fields are marked *

Every WBW plugin, one license.

All Access unlocks every WBW plugin, Pro: $249 once, or $99 a year.