Variable product price (range) discount or strikeout is not shown
Fix the issue where discount or strikeout prices for variable products are not displayed.
add_filter('woocommerce_get_price_html', function($html, $product){
if(is_object($product) && method_exists($product, 'get_type') && $product->get_type() == 'variable') {
if (class_exists('\Wdr\App\Router') && method_exists(\Wdr\App\Router::$manage_discount, 'getVariablePriceHtml')) {
return \Wdr\App\Router::$manage_discount->getVariablePriceHtml($html, $product);
}
}
return $html;
}, 9999, 2);