/* Disable Prices Shop+Single Product Page */
function wpflt_hide_woocommerce_prices( $price ) {
return '';
}
add_filter( 'woocommerce_get_price_html', 'wpflt_hide_woocommerce_prices' );
add_filter( 'woocommerce_is_purchasable', '__return_false');
There is a small catch in the above code. If you only use the ‘woocommerce_get_price_html‘ filter, it disables prices Only on Shop and Single Product Page. However, people will still be able to view prices by adding products to the cart and visiting the cart page.
So, we added the ‘woocommerce_is_purchasable‘ filter where the WooCommerce Purchase function is disabled. Hence products already in the cart will be automatically removed and hence prices will not be disclosed.
Alternatively, you can also run WooCommerce in 100% Catalogue Mode instead of hiding Prices.