• Resolved whitmason

    (@whitmason)


    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
    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

    (@wpexpertsio)

    Hi @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 4 years, 7 months ago by WPExperts.io.
    Thread Starter whitmason

    (@whitmason)

    Before I submitted the error, I had tried disabling all plugins except WooCommerce, Still got the error.

    Thread Starter whitmason

    (@whitmason)

    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

    (@whitmason)

    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

    (@wpexpertsio)

    Hi @whitmason,
    Please follow the steps in the documentation on how to connect with “Woo Square”
    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

    (@wpexpertsio)

    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.