Title: Refund function does not work
Last modified: July 24, 2020

---

# Refund function does not work

 *  Resolved [lucasbarletta](https://wordpress.org/support/users/lucasbarletta/)
 * (@lucasbarletta)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/refund-function-does-not-work/)
 * Hi,
    The refund function doesn’t working, An error occurred while attempting 
   to create the refund using the payment gateway API. Could someone help me?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Frefund-function-does-not-work%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  [wpexpertssupportteam](https://wordpress.org/support/users/wpexpertssupportteam/)
 * (@wpexpertssupportteam)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/refund-function-does-not-work/#post-13173703)
 * Hi [@lucasbarletta](https://wordpress.org/support/users/lucasbarletta/),
    Thanks
   for using “WooSquare – Square for WooCommerce”, Please make sure that your order
   is processing. If you are still facing any issue please share us a screencast
   video so we can look into it for you.
 *  Thread Starter [lucasbarletta](https://wordpress.org/support/users/lucasbarletta/)
 * (@lucasbarletta)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/refund-function-does-not-work/#post-13176037)
 * Attach a video screen of the error.
    [video src="http://arpiximagepro.com/videos/
   refund-order-error.m4v" /] thanks
 *  [wpexpertssupportteam](https://wordpress.org/support/users/wpexpertssupportteam/)
 * (@wpexpertssupportteam)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/refund-function-does-not-work/#post-13179115)
 * Hi [@lucasbarletta](https://wordpress.org/support/users/lucasbarletta/),
    We 
   are unable to replicate this issue at our staging environment. Our technical 
   team need’s some more info from your side to sort out this issue please open 
   a support ticket at our website also please have a look at the screenshot shared
   below.
 * [https://prnt.sc/tpqswn](https://prnt.sc/tpqswn)
 *  [whitmason](https://wordpress.org/support/users/whitmason/)
 * (@whitmason)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/refund-function-does-not-work/#post-13311301)
 * It is possible that this error with refunds is related to an error I reported
   previously – [https://wordpress.org/support/topic/locationid-is-required/](https://wordpress.org/support/topic/locationid-is-required/).
   The problem only occurs in production, not in the staging environment. When you
   fixed the error I reported, I told you that the error was not fixed in all places
   in the code, including the code for refunds. The code is still not fixed in WooSquare
   3.7. Code in SquareGateway.class.php line 643 needs to be changed. woo_square_location_id
   is not defined in the production environment.
 *  [wpexpertssupportteam](https://wordpress.org/support/users/wpexpertssupportteam/)
 * (@wpexpertssupportteam)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/refund-function-does-not-work/#post-13319607)
 * Hi [@whitmason](https://wordpress.org/support/users/whitmason/),
    This issue 
   didn’t belong to the mentioned “locationid-is-required” issue because the square
   refund endpoint doesn’t need location id to proceed with the refund so there 
   is no need location id to pass. You can share with us a screencast video so we
   can dig it more.
 * Thanks!
 *  [whitmason](https://wordpress.org/support/users/whitmason/)
 * (@whitmason)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/refund-function-does-not-work/#post-13454482)
 * Even though location id is not required to proceed, the code might be failing
   because the variable woo_square_location_id is not defined in the production 
   environment. This generates an error. This code is inside a try/catch, so an 
   error message is logged and the refund is not processed.
 *  [wpexpertssupportteam](https://wordpress.org/support/users/wpexpertssupportteam/)
 * (@wpexpertssupportteam)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/refund-function-does-not-work/#post-13463114)
 * Hi [@whitmason](https://wordpress.org/support/users/whitmason/),
 * Please use the updated plugin shared below.
 * [https://drive.google.com/file/d/1j5cqY4udBfQd5ibSxw1yQjkjS6xCG7zh/view](https://drive.google.com/file/d/1j5cqY4udBfQd5ibSxw1yQjkjS6xCG7zh/view)
 * Thanks!

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

The topic ‘Refund function does not work’ is closed to new replies.

 * ![](https://ps.w.org/woosquare/assets/icon-128x128.gif?rev=3123976)
 * [WC Shop Sync – Square Payment Gateway and Product Synchronization for WooCommerce](https://wordpress.org/plugins/woosquare/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woosquare/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woosquare/)
 * [Active Topics](https://wordpress.org/support/plugin/woosquare/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woosquare/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woosquare/reviews/)

## Tags

 * [payment](https://wordpress.org/support/topic-tag/payment/)

 * 7 replies
 * 3 participants
 * Last reply from: [wpexpertssupportteam](https://wordpress.org/support/users/wpexpertssupportteam/)
 * Last activity: [5 years, 8 months ago](https://wordpress.org/support/topic/refund-function-does-not-work/#post-13463114)
 * Status: resolved