Woo – Show price at ALL COST

0.0/5
<?php
add_filter('woocommerce_variable_empty_price_html', function($price, $product) {
	$price = $product->get_price();

	if (!empty($price)) {
		$price = apply_filters('woocommerce_variable_price_html', $price . $product->get_price_suffix(), $product);
		
		if ($product->is_on_sale()) { 
			$price = wc_format_sale_price(wc_price($product->get_regular_price()), wc_price($price)); 
		} else { 
			$price = wc_price($price); 
		}

	}
	
	return $price;
}, 0, 2);

Comments and reviews

{{ reviewsTotal }} Review
{{ reviewsTotal }} Reviews
{{ options.labels.newReviewButton }}
{{ userData.canReview.message }}

Description

Enables showing prices at all cost.

Author

Tags