Refund Issue – Multiple Refunds per Vendor Order

MultivendorX

Tagged: 

Resolved
Viewing 8 reply threads
  • Author
    Posts
    • #194482
      Justin Harrison
      Participant

      Hi Support, I had an issue where there was a refund shown in the Vendor Dashboard after triggering a refund and it was correct, but then a second refund was also always added which was not correct and it also triggered an additional refund email that was incorrect. When debugging, I figured out that wc_create_refund is getting called in two different places…. as part of the mvx_do_refund function in class-mvx-ajax.php first and then also as part of the mvx_order_refunded function in class-mvx-order.php later. I removed the action that was calling the mvx_order_refunded like this:
      add_action(‘init’, ‘only_process_refunds_once’);
      function only_process_refunds_once(){
      global $MVX;
      remove_action(‘woocommerce_order_refunded’, array($MVX->order,’mvx_order_refunded’), 10, 2);
      }

      It’s operating properly and as expected after this, but my question is are multiple refunds supposed to be created for some reason? Is this a bug or am I missing something here? I’m okay with the fix I’ve found, but I’m curious if it is intended for a reason I’m not seeing.

      Please note that I am entering custom refund amounts and processing them manually on the vendor dashboard if that may have something to do with it. Thank you!

    • #194489

      Hello @Justin Harrison. Thanks for sharing this with us.
      We have checked the flow on our end. When a customer requests for a refund the vendor receives a refund request. But when the order gets refunded the customer receives two emails, one notifying the refund of the suborder and one for notifying the refund for the main order.
      Now if you are referring to something else please share a video explaining the issue. So that we can try to recreate that on our end and help you accordingly.

    • #194499
      Justin Harrison
      Participant

      Hi Sangita, I will need to reproduce the error in a default environment for video since our platform is fairly customized. I am attaching a few screenshots that show the two separate refunds that are being created when only requesting one. The first (lower refund #) is correct and then there’s a second for a lesser amount that is incorrect and I don’t know where it came from. I will try to provide a video soon to show you the issue that I am running into.

      The two order emails, one for the suborder and one for the main order, is not the problem. I actually added a custom snippet so only a suborder email is sent out.

    • #194521

      @Justin Harrison Thanks for explaining the issue.
      I have tried to recreate the issue on my end. A customer has ordered two products from a vendor and as the product is from the same vendor hence only one suborder was created https://prnt.sc/N9oxSMTp4ViO. Then the customer requested for a refund from his end and as there was only one suborder hence only one refund request was generated https://prnt.sc/mSgeMR-L5sYJ.
      Now when the vendor is accepting the refund request only one refund is getting created for that suborder https://prnt.sc/gvgiZ2vj9qxD.
      Now as we are unable to recreate the issue on our end it will be really great if you kindly share a video to show how we can recreate the issue on our end and help you accordingly.
      It will be also helpful, if you can share temporary admin access of your staging site, we can check.

    • #194535
      Justin Harrison
      Participant

      Hi Sangita, thanks for checking. I will make a video to show the issue on my end and submit it.

    • #194555

      We will wait for the video.

    • #194992
      Justin Harrison
      Participant

      Sorry Sangita for the delay. I haven’t had time to test and replicate this in a development environment without customizations yet. I will get this done shortly and follow up.

    • #195024

      We will wait for the details. Please share those when you are done.

    • #197024

      Its been a while and we have not heard back from you. We presume your issue is solved now. We are closing this thread as of now. If you need help or face issue in future please open a new support topic.

Viewing 8 reply threads

The topic ‘Refund Issue – Multiple Refunds per Vendor Order’ is closed to new replies.