Notice: These forums are now retired and closed. For active support, please Submit a Ticket or visit our official WordPress.org community pages.
Kadence Theme | Kadence Blocks | Starter Templates | WooCommerce Email Designer | Ascend | Virtue | Pinnacle

Problems with 2.5.8

Home / Forums / Virtue Theme / Problems with 2.5.8

This topic is: Resolved
[Resolved]
Posted in: Virtue Theme
September 6, 2014 at 3:08 am

I used this code this 2.5.7 in functions.php. Doesn’t work with 2.5.8, and yes, I check functions.php file 😉

// Add save percent next to sale item prices.
add_filter( ‘woocommerce_sale_price_html’, ‘woocommerce_custom_sales_price’, 10, 2 );
function woocommerce_custom_sales_price( $price, $product ) {
$percentage = round( ( ( $product->regular_price – $product->sale_price ) / $product->regular_price ) * 100 );
return $price . sprintf( __(‘ (- %s’, ‘woocommerce’ ), $percentage . ‘%)’ );
}

Any idea ?

JMS

  • The forum ‘Virtue Theme’ is closed to new topics and replies.