Title: Internal Server Error
Last modified: April 19, 2020

---

# Internal Server Error

 *  Resolved [whitmason](https://wordpress.org/support/users/whitmason/)
 * (@whitmason)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/internal-server-error-611/)
 * I have a site that is setup to use the sandbox at Square. The site is not setup
   to access a normal Square account, just the sandbox. It uses the free version
   of WooSquare. When paying for an order at checkout, everything seems to work,
   but at the end, the checkout page displays “Internal Server Error” instead of
   a success message. Orders were created in Square and in WooCommerce and seem 
   okay.
 * I have tried recreating the tokens in Square, and restarting the browser, but
   the problem still occurs. I noticed in Square for developers that the Redirect
   URL is not set in the OAuth section. Does it need to be? If so, what should it
   be set to? Any other ideas about what could be causing the error?
 * Log info:
 * Request URL: [https://test.com/?wc-ajax=checkout](https://test.com/?wc-ajax=checkout)
   
   Request Method: POST Status Code: 500 Internal Server Error
 * The WC_Order::get_order_currency function is deprecated since version 3.0. Replace
   with WC_Order::get_currency.
 * id was called incorrectly. Order properties should not be accessed directly. 
   Backtrace: require(‘wp-blog-header.php’), require_once(‘wp-includes/template-
   loader.php’), do_action(‘template_redirect’), WP_Hook->do_action, WP_Hook->apply_filters,
   WC_AJAX::do_wc_ajax, do_action(‘wc_ajax_checkout’), WP_Hook->do_action, WP_Hook-
   >apply_filters, WC_AJAX::checkout, WC_Checkout->process_checkout, WC_Checkout-
   >process_order_payment, WooSquare_Gateway->process_payment, WC_Abstract_Legacy_Order-
   >__get, wc_doing_it_wrong. This message was added in version 3.0.
 * WooCommerce version: 4.0.1
    WooSquare 3.6.2 WordPress version: 5.4 Server info:
   Microsoft-IIS/8.5 PHP version: 7.2.1

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

 *  Plugin Author [WPExperts.io](https://wordpress.org/support/users/wpexpertsio/)
 * (@wpexpertsio)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/internal-server-error-611/#post-12700696)
 * Hi [@whitmason](https://wordpress.org/support/users/whitmason/),
 * It looks like one of your plugins is conflicting with “WooSquare – Square for
   WooCommerce” please deactivate your plugins one by one to check with which one
   it is conflicting also we will be releasing an update to replace the deprecated
   functions.
 * Thanks!
    -  This reply was modified 6 years, 1 month ago by [WPExperts.io](https://wordpress.org/support/users/wpexpertsio/).
 *  Thread Starter [whitmason](https://wordpress.org/support/users/whitmason/)
 * (@whitmason)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/internal-server-error-611/#post-12702007)
 * Before I submitted the error, I had tried disabling all plugins except WooCommerce,
   Still got the error.
 *  Thread Starter [whitmason](https://wordpress.org/support/users/whitmason/)
 * (@whitmason)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/internal-server-error-611/#post-12702620)
 * I wondered if the problem is due to how I set up the developer account in Square.
   The Redirect URL is not set in the OAuth section. Does it need to be? If so, 
   what should it be set to?
 *  Thread Starter [whitmason](https://wordpress.org/support/users/whitmason/)
 * (@whitmason)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/internal-server-error-611/#post-12704658)
 * The problem was with the WooSquare itself. Turns out that the internal server
   error disappears when debugging is enabled in wp-config.php, and comes back when
   debugging is disabled. I was able to temporarily fix the problem by editing SquareGateway.
   class.php to fix the errors I reported in my initial post. I replaced the call
   to get_order_currency, and I replaced $order->id with $order_id. The request 
   now returns a 200 code instead of 500, and no errors in the error log.
 *  Plugin Author [WPExperts.io](https://wordpress.org/support/users/wpexpertsio/)
 * (@wpexpertsio)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/internal-server-error-611/#post-12705615)
 * Hi [@whitmason](https://wordpress.org/support/users/whitmason/),
    Please follow
   the steps in the documentation on how to connect with “Woo Square” [https://apiexperts.io/documentation/woosquare/](https://apiexperts.io/documentation/woosquare/)
   also, we have tested the scenario on our staging environment and everything is
   working properly fine also there is no need to set the Redirect URL.
 * Thanks!
 *  Plugin Author [WPExperts.io](https://wordpress.org/support/users/wpexpertsio/)
 * (@wpexpertsio)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/internal-server-error-611/#post-12741292)
 * This thread has been marked as resolved due to lack of activity.
 * You’re always welcome to re-open this topic.
 * Thanks for understanding!

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

The topic ‘Internal Server Error’ 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/)

 * 6 replies
 * 2 participants
 * Last reply from: [WPExperts.io](https://wordpress.org/support/users/wpexpertsio/)
 * Last activity: [6 years, 1 month ago](https://wordpress.org/support/topic/internal-server-error-611/#post-12741292)
 * Status: resolved