Support » Plugin: WooCommerce Square » New error in server log

  • Resolved korvak

    (@korvak)


    What’s this error? It is coming from Square. It is saying that there isn’t a table wp_woocommerce_square_customers that is supposed to exist.

    2022/06/22 02:20:52 [error] 70187#70187: *563031 FastCGI sent in stderr: "PHP message: WordPress database error Table 'mydomain.wp_woocommerce_square_customers' doesn't exist for query SELECT square_id FROM wp_woocommerce_square_customers WHERE email_address = 'linneahur@gmail.com' made by 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_complete_order'), WP_Hook->do_action, WP_Hook->apply_filters, Objectiv\Plugins\Checkout\Action\CFWAction->execute, Objectiv\Plugins\Checkout\Action\CompleteOrderAction->action, WC_Checkout->process_checkout, WC_Checkout->process_order_payment, WooCommerce\Square\Framework\PaymentGateway\Payment_Gateway_Direct->process_payment, WooCommerce\Square\Gateway->get_order, WooCommerce\Square\Gateway\Customer_Helper::get_customers_by_emailPHP message: WordPress database error Table 'mydomain.wp_woocommerce_square_customers' doesn't exist for query SHOW FULL COLUMNS FROM wp_woocommerce_square_customers made by 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_complete_order'), WP_Hook->do_action, WP_Hook->apply_filters, Objectiv\Plugins\Checkout\Action\CFWAction->execute, Objectiv\Plugins\Checkout\Action\CompleteOrderAction->action, WC_Checkout->process_checkout, WC_Checkout->process_order_payment, WooCommerce\Square\Framework\PaymentGateway\Payment_Gateway_Direct->process_payment, WooCommerce\Square\Gateway->get_order, WooCommerce\Square\Gateway\Customer_Helper::add_customer" while reading response header from upstream, client: 135.180.11.30, server: mydomain.com, request: "POST /?wc-ajax=complete_order&nocache=1655864446896 HTTP/1.1", upstream: "fastcgi://unix:/var/run/php8.0-fpm-mydomain.sock:", host: "www.mydomain.com:50986", referrer: "https://www.mydomain.com/checkout/"

    • This topic was modified 1 month, 3 weeks ago by korvak.
Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support 3 Sons Development – a11n

    (@3sonsdevelopment)

    Hey @korvak,

    There should be a wp_woocommerce_square_customers table created in the database by the Square extension. As you pointed out, it doesn’t exist on this site.

    I would suggest temporarily disabling the Square plugin and then enabling it again. That should trigger this table to be created.

    If you see new instances of this error after that, please send me 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, you can paste it here.

    Thanks

    Thread Starter korvak

    (@korvak)

    I disabled, and enabled the plugin. I just checked in phpMyAdmin and I still don’t have any table called wp_woocommerce_square_customers.

    How should I proceed to get this table to be created?

    Plugin Support 3 Sons Development – a11n

    (@3sonsdevelopment)

    Hey @korvak,

    I was just able to reproduce this on a new site. My regular test site has the table but it’s also been running Square for a couple of years. There may be an issue with the current version that’s causing the table not to be created.

    Is this a new installation of Square or have you been using it for a while? Let me know and we’ll go from there.

    Thanks!

    Plugin Support 3 Sons Development – a11n

    (@3sonsdevelopment)

    You can also run a bit of SQL in phpMyAdmin to create the table for you. If the database prefix is wp_ then see if this works for you. Please make a backup before running any SQL just in case.

    The forums did not like the formatting so I moved this to a Gist:

    https://gist.github.com/billrobbins/5b01f075a6936a51b2ef464d8d9dea98

    Thread Starter korvak

    (@korvak)

    This is an installation I’ve been using for two months that I upgraded from version 2.9.X. I just ran the SQL query you sent, and now the table exists. I’ll keep an eye on it to see if the table starts populating data soon.

    Thread Starter korvak

    (@korvak)

    So far, two hours later the new table is still empty. What is this table used for? Plenty of orders received but still no data in the wp_woocommerce_square_customers table.

    Plugin Support 3 Sons Development – a11n

    (@3sonsdevelopment)

    Hey @korvak,

    I’m glad to hear the table is there and that checkout is working.

    The idea here is that this table will store the Square customer ID for guest users. That way if they register in the future, or purchase again, a duplicate customer won’t be created in Square.

    Let us know how things go with the new table or if you have any questions.

    Thanks!

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.