Website Building » WooCommerce » How Do I Remove Sale Price From WooCommerce Product Page?

How Do I Remove Sale Price From WooCommerce Product Page?

Last updated on January 15, 2023 @ 12:01 pm

It’s a common question asked by WooCommerce store owners: “How do I remove the sale price from my product page?”

The answer is actually quite simple. You just need to add a bit of code to your functions.php file. Here’s the code you need to add:

remove_action(
  'woocommerce_after_shop_loop_item_title',
  'woocommerce_template_loop_price',
  10
);

This will remove the sale price from all products on your shop page. If you only want to remove the sale price from certain products, you can use this code:

PRO TIP: If you are using WooCommerce to sell products on your website, you may want to remove the sale price from the product page. This can be done by going to the WooCommerce settings page and selecting the “Remove Prices” option.

However, removing the sale price from the product page can also remove other important information, such as the product’s SKU and stock status. This could cause problems with your inventory management and order fulfillment.

code>add_filter( 'woocommerce_get_price_html', 'mycode_remove_sale_price', 100, 2 );

function mycode_remove_sale_price( $price, $product ) {
  if ( $product->is_on_sale()) return '';
  return $price;
}

Conclusion: To remove the sale price from your product page, you just need to add a bit of code to your functions. You can also remove the sale price from certain products by using a different code.

Drew Clemente

Drew Clemente

Devops & Sysadmin engineer. I basically build infrastructure online.