Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Show Cost in Points
- * Show the cost of a product in points next to the regular price.
- * @version 1.0
- */
- add_filter( 'woocommerce_get_price_html', 'mycred_pro_adjust_price', 10, 2 );
- function mycred_pro_adjust_price( $price, $Woo_Product ) {
- if ( $Woo_Product->price > 0 ) {
- $mycred = mycred();
- return '<span class="amount">$ ' . $mycred->format_number( $Woo_Product->price ) . '</span><small>( ' . $mycred->format_creds( $Woo_Product->price*100 ) . ' )</small>';
- }
- return $price;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement