Hi there!
Would you mind sharing the exact steps you’ve followed to replicate this behavior?
Along with that, could you please share a copy of your site’s System Status? You can find it via WooCommerce > Status. Select “Get system report” and then “Copy for support”. Once you’ve done that, paste it here in your response.
Thread Starter
taak7
(@taak7)
thank you, @aashik.
1. Bought a item with credit card (Square) as a customer.
2. Opened WooCommerce order list of WordPress Admin page.
3. Selected the order.
4. Clicked Refund button. -> image
5. Put an amount of refund. -> image
6. Clicked “refund with Square” button. -> image
7. You will see the same transaction memo. -> image
* “処理中から払い戻しに変更しました” means “changed to refunded from processing”
Thread Starter
taak7
(@taak7)
to @aashik
I sent the system report to you using slack.
thank you.
Hi there!
Thank you for the System Status Report.
Just a heads up that for future interactions, we do not specifically provide assistance via Slack. If you want other forum volunteers to assist you with your query, the best place to add your System Status Report would be the forum topic itself.
Regarding the issue itself, I don’t specifically see anything obvious in your System Status Report.
I was able to follow your instructions to see this behavior on my test site:
Link to image: https://d.pr/i/BHjPRo
Are you referring to the multiple order status changed notes?
Thread Starter
taak7
(@taak7)
Hi, there!
Thank you for your image.
I can see the same behavior of changing status in your image.
And I can see that increasing item event ran only once.
I would like to write custom event when the order refunded.
When i using hook “woocommerce_order_status_refunded”, event ran twice.
If you know the other hook, please let me know…
thank you.
Hi there!
I would like to write custom event when the order refunded.
When i using hook “woocommerce_order_status_refunded”, event ran twice.
I’m not sure I completely understand what you’re looking to do. Are you saying that with your custom code, woocommerce_order_status_refunded
is run twice, increasing the order stock twice, and you want to stop that?
If that is the case, I may not be able to help with that directly since it needs developer intervention, but you may want to post the custom code here in this thread to see if there are other forum volunteers that can help with the same.
If this was not what you had in mind, or if you have further queries regarding this, please feel free to get back to us with more information, so that we can investigate further.
Thread Starter
taak7
(@taak7)
Thanks @aashik and sorry for the confusion.
I must have missed your sentence..
Are you referring to the multiple order status changed notes?
YES!
I want to write my custom code that runs when an order is refunded.
I tried that using hook woocommerce_order_status_refunded
.
But this hook runs twice when the order refunded using square.
So my code runs twice, too…
Is this woocommerce for square’s bug?
Do you have any idea to make my code works only once?
Hi there!
Thanks for confirming. I tested this further to notice that this only happens when the order is fully refunded.
For example, when you have multiple items in an order and refund partially, you don’t see the order status refunded message multiple times:
Link to image: https://d.pr/i/x6hRYI
I’m reaching out to our developers for further details regarding this.
Hello @taak7
Thanks a lot!!!
My pleasure. I did reach out to the developers who confirmed that this indeed looks like a bug. I’ve now created an internal report for the same.
I do not have a planned date for a fix at this time but we will work on it as soon as possible.
You can keep an eye out for the fix in the plugin release changelogs: https://wordpress.org/plugins/woocommerce-square/#developers
I’ll mark this topic as solved for now. Please feel free to open a new topic if you have any other questions.