How to Hide Product Price WooCommerce

There is some method to hide product price in woocommerce, with filters, css or plugin.

This is how to hide product price with CSS.

Cart

#cart > a > span.amount {
    display: none;
}

Sidebar

div.deals-information > div.price{
    display: none;
}

Individual Product

div.widget.widget-products.products > div > div > div:nth-child(2) > div.col-md-4.col-sm-12.shopcol.last.wow.fadeInUp.product-wrapper > div > div > div > div.price{
    display: none;
}

 

This is how to hide product price woocommerce with filters


add_filter( 'woocommerce_get_price_html', 'wso_hide_prices', 10, 2 );
function wso_hide_prices( $price ) {
global $product;
if(is_product()){
if(get_post_meta( $product->id, 'wso_hide_price', true ) == 'yes'){
$price = '';
}else{
$currency = get_woocommerce_currency_symbol();
$price = $currency.$product->price;
}
}
return $price;
}

How to hide product price woocommerce with plugin

Or simply using plugin called WooCommerce Secret Options, with this plugin, you can easily hide price with one click.

Related Posts

How to link WP Domain Checker Buy Button to Contact Form 7

Is it possible to link WP Domain Checker Buy Button / Purchase Button to Contact Form 7? This is a question from one of WP Domain Checker user. The answer is YES. It is possible! We can use HTTP GET variables feature from Contact Form 7. To get the default value from HTTP GET variables, add default:get option to […]

Read More

Recommended File Permissions for WordPress

July 31, 2017

Security, Tutorial, WordPress

What permissions should I have for the following: Root folder storing all the WordPress content wp-admin wp-content wp-includes On computer filesystems, different files and directories have permissions that specify who and what can read, write, modify and access them. This is important because WordPress may need access to write to files in your wp-content directory to enable certain functions. […]

Read More