Hi @dgenc,
Thanks for reaching out to our support forum. Please use below code snippet to your themes function.php file. It will add 100 USD instead of 105. Before that please make sure you have updated to latest version of our plugin.
add_filter('woo_wallet_credit_purchase_amount', 'woo_wallet_credit_purchase_amount_callback', 10, 2);
function woo_wallet_credit_purchase_amount_callback($recharge_amount, $order_id) {
$order = wc_get_order($order_id);
$recharge_amount = $order->get_subtotal('edit');
if ('on' === woo_wallet()->settings_api->get_option('is_enable_gateway_charge', '_wallet_settings_credit', 'off')) {
$charge_amount = woo_wallet()->settings_api->get_option($order->get_payment_method(), '_wallet_settings_credit', 0);
if ('percent' === woo_wallet()->settings_api->get_option('is_enable_gateway_charge', '_wallet_settings_credit', 'percent')) {
$recharge_amount -= $recharge_amount * ($charge_amount / 100);
} else {
$recharge_amount -= $charge_amount;
}
update_post_meta($order_id, '_wc_wallet_purchase_gateway_charge', $charge_amount);
}
return $recharge_amount;
}
Thank you.
@dgenc,
Happy to hear from you that above code works for you.
I am marking this topic as resolved please feel free to create a new thread for any further assistance.
Could you please consider posting a review of our plugin? In addition to providing feedback, reviews can help other users to know who we are and what our plugin does.
Cheers