• Resolved Krystian Rzepa

    (@krystianrzepa)


    Hello

    I have a problem with tax when someone topup his wallet. I have a tax set to 23%, so when I enter eg 100$ amount to topup, I get only a 81,30$ to my wallet. It should be 100$ (with tax, and I get without tax). How I can change it?

    Thanks.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Subrata Mal

    (@subratamal)

    @krystianrzepa Please use the attached code in theme functions.php file.

    add_filter('woo_wallet_credit_purchase_amount', 'woo_wallet_credit_purchase_amount_callback', 10, 2);
    if(!function_exists('woo_wallet_credit_purchase_amount_callback')) {
        function woo_wallet_credit_purchase_amount_callback($amount, $order_id) {
            $order = wc_get_order($order);
            $amount = $order->get_total('edit');
            return $amount;
        }
    }
    Thread Starter Krystian Rzepa

    (@krystianrzepa)

    @subratamal Your code isn’t working. I get below error and I don’t get topup to wallet:
    PHP Fatal error: Uncaught Error: Call to a member function get_total() on bool in //file_location// eval()’d code:73

    Plugin Author Subrata Mal

    (@subratamal)

    @krystianrzepa Sorry please use the updated code.

    add_filter('woo_wallet_credit_purchase_amount', 'woo_wallet_credit_purchase_amount_callback', 10, 2);
    if(!function_exists('woo_wallet_credit_purchase_amount_callback')) {
        function woo_wallet_credit_purchase_amount_callback($amount, $order_id) {
            $order = wc_get_order($order_id);
            $amount = $order->get_total('edit');
            return $amount;
        }
    }
    Thread Starter Krystian Rzepa

    (@krystianrzepa)

    @subratamal Many thanks! 🙂 Now everything is fine.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Top up tax problem’ is closed to new replies.