WooCommerce, by default, offers related products as a commonly employed recommendation tactic. However, the Related Products for WooCommerce plugin by WebToffee opens up a gateway to a wide range of customizations for your related products section. This article explains how you can hide price labels from WooCommerce related product recommendations.
Set up related products
To begin with, once the plugin is installed and activated:
- From the WordPress dashboard, navigate to WooCommerce > Related products.
- Configure the Related product recommendations as you prefer.
- You have the option to display either the default related product recommendation from WooCommerce or opt for a customized version of the recommendation.
- Save the changes.
Hide price labels from related products
To hide the price labels of related product recommendations on the store, use the below-provided code snippet in your theme’s functions.php file. To do so,
- Navigate to Appearance > Theme File Editor > functions.php file from the WordPress dashboard.
- Copy the code snippet provided below.
- Paste the code snippet into the bottom of the functions.php file.
- Save the functions.php file.
- Alternatively, if you can’t find the functions.php file for your theme, refer to this article to learn how to add the code snippet to your store.
Code snippet
Once the snippet is added successfully, the related product recommendation in your store will no longer have price labels for the products within the recommendation.