I and of course many of you often need to remove the Free Pricing Tags while working on wordpress woocommerce. Here is the solution for the requirement in the form of filters/actions. Now, I have made it very easy to do as the whole process is mentioned below step by step
(1) Login to your Wordpress website admin panel
(2) Go to appearance and click editor
(3) Find Theme Functions.php, and open it
(4) Copy the below code
=======================Code Starts============================
add_filter( 'woocommerce_variable_free_price_html', 'hide_free_price_notice' );
add_filter( 'woocommerce_free_price_html', 'hide_free_price_notice' );
add_filter( 'woocommerce_variation_free_price_html', 'hide_free_price_notice' );
/**
* Hides the 'Free!' price notice
*/
function hide_free_price_notice( $price ) {
return '';
}
========================Code Ends============================
(5) Paste the code below the all existing codes in the Theme Function.php page and save
(6) Refresh the urls with Free Pricing Tags, and you could see there is not any free tag with free products.
(1) Login to your Wordpress website admin panel
(2) Go to appearance and click editor
(3) Find Theme Functions.php, and open it
(4) Copy the below code
=======================Code Starts============================
add_filter( 'woocommerce_variable_free_price_html', 'hide_free_price_notice' );
add_filter( 'woocommerce_free_price_html', 'hide_free_price_notice' );
add_filter( 'woocommerce_variation_free_price_html', 'hide_free_price_notice' );
/**
* Hides the 'Free!' price notice
*/
function hide_free_price_notice( $price ) {
return '';
}
========================Code Ends============================
(5) Paste the code below the all existing codes in the Theme Function.php page and save
(6) Refresh the urls with Free Pricing Tags, and you could see there is not any free tag with free products.
No comments:
Post a Comment