I am using WooCommerce and Woocrypt and in the payment gateway for bitcoins I have added the following code in my gateway:
<b class="bold-titel">Amount</b>
<span class="ngh-blocktext copywrap-address"><?php echo $order->get_total(); ?></span>
Ex, it shows, total amount to pay is ex: 50$ but I wait it to show 55$ (50$ + 10% without adding the code i inserted further down here which change total cart)
I am wondring is it possible to add 10% fee to the get_total command? i dont want to add 10% to the cart i only want the above code to display 10% extra. I have this to advertise to the customer that he pays the 10% extra fee if they get free item on there order.
I got:
add_action( 'woocommerce_cart_calculate_fees', 'custom_fee_based_on_cart_total', 10, 1 ); function
custom_fee_based_on_cart_total( $cart ) {
if ( is_admin() && ! defined( 'DOING_AJAX' ) ) return;
// The percentage
$percent = 10; // 10%
// The cart total
$cart_total = $cart->cart_contents_total;
// The conditional Calculation
$fee = $cart_total >= 25 ? $cart_total * $percent / 100 : 0;
if ( $fee != 0 )
$cart->add_fee( __( "Gratuity", "woocommerce" ), $fee, false );
}
which adds fee to total order.
I don't want this, I only want the above code to show the get_total with 10% added to the total amount.