Home / Tag Archives: WooCommerce Products Custom Fields

Tag Archives: WooCommerce Products Custom Fields

WooCommerce Products Custom Fields with Discount price

WooCommerce Products Custom Fields with Discount price. /***********************my custom code******************/ // 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 ); echo $price . sprintf( …

Read More »
0

December 10, 2016

Clear all