Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // WooCommerce - Round prices up
- add_filter( 'wc_price', 'my_price', 3, 60 );
- function my_price( $return, $price, $args ) {
- // $return = price with currency symbol
- // $price = price as a number
- // $args = array (inc tax, exc tax)
- $price = number_format( ceil( $price ), 2 );
- $cs = get_woocommerce_currency_symbol(); // default currency symbol
- return $cs.$price;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement