• Resolved mikel

    (@tahamohamadi)


    One problem was that my user added an inventory and used a discount code to add a wallet and received a discount to increase their inventory! But the user wallet was recharged at the original amount and the discount code applied did not decrease from the total amount originally intended for recharge and after that it re-used the incremental inventory with discount code again to purchase the products. Again discounted and actually bought the product with a bug in the free plugin! The problem is, when a user intends to increase inventory, the discount code should not be applied to the inventory increase, and if applied, the discount should be reduced!

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

    (@subratamal)

    @tahamohamadi

    Please use below code into active theme function.php to allow wallet recharge with discount code.

    add_filter('woo_wallet_credit_purchase_amount', 'woo_wallet_credit_purchase_amount_callback');
    if(!function_exists('woo_wallet_credit_purchase_amount_callback')){
        function woo_wallet_credit_purchase_amount_callback($purchase_amount, $order_id){
            $order = wc_get_order($order_id);
            return $order->get_total('edit');
        }
    }

    Thanks

Viewing 1 replies (of 1 total)
  • The topic ‘Apply discount code to add inventory’ is closed to new replies.