Created
October 3, 2015 18:12
-
-
Save zarankumar/5cadf479c2303aa041b7 to your computer and use it in GitHub Desktop.
Woocommerce set sale price to regular price - 15% discount
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function so_31493236_sale_price( $sale_price, $product ) { | |
$sale_price = $product->get_regular_price() * 0.15; | |
return $sale_price; | |
} | |
add_filter( 'woocommerce_get_sale_price', 'so_31493236_sale_price', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment