Troubleshooting Square Woocommerce Inventory Sync

Not able to connect your site to Square? You must be the owner of the Square account to do so. This integration requires access to much of the data in your Square account, and Square only grants these permissions to owners.

Unauthorized Error

If you encounter an “Unauthorized” error when trying to connect with Square, please check with Square to confirm if you are the owner of the account you’re connecting to.

Product/Inventory Sync Issues

If you experience problems with the product/inventory sync, please consider the following:

  • Are SKUs set for your Square and WooCommerce products? This is how the plugin will match products between these systems.
  • Is the Square product assigned to the Location configured in the plugin settings? Keep in mind that this plugin only supports one Square Location. If some products aren’t syncing as expected, please double-check to ensure they are in the same Square Location defined in the plugin settings.
  • Does your site support background processing? Background processing is necessary for successfully syncing product data between Square and WooCommerce. Furthermore, several other WooCommerce features/plugins also require background processing. If your site fails, don’t hesitate to contact your host for assistance in enabling background processing/loopback connections. While some hosts may mistakenly identify this as a security issue, using a loopback connection does not pose any security threat. If done correctly, it won’t increase server usage. Quality hosts will effectively manage any increase in server usage through rate limiting.

Please note that WPEngine terminates processes taking longer than 60 seconds. As a result, the wc_square_background_sync process may be stopped. However, this only affects clients on shared hosting. If you encounter this issue, you can temporarily resolve it by reaching out to WPEngine and requesting them to turn off the termination for the duration of the import. Alternatively, you can wait for the process to get stuck, use the Clear Square Sync option under WooCommerce > Status > Tools, and then start the import again. Repeat this process until no further products are imported. The log will be marked with “Completed step cycle: update_inventory_counts.”

See also  Best POS Systems for WooCommerce in 2022

Square for WooCommerce v3.0 and Newer

The latest version of Square for WooCommerce (v3.0 and newer) uses the official Square SDK for API communication with the Square platform. To improve performance, some API responses are cached.

  • Ensure opcache.save_comments is enabled. This setting is necessary for the plugin and product sync to work correctly. If you encounter issues and this setting is disabled, please contact your hosting provider to enable it.

Translating Credit Card Fields

If the credit card fields are not translating, follow these steps:

  1. Obtain the .pot language files from wp-content/plugins/woocommerce-square/i18n/languages.
  2. Use these files to generate two new language files, replacing the {locale} placeholder with the appropriate one:
    • woocommerce-square-{locale}.mo
    • woocommerce-square-{locale}.po
  3. Place the two translation files under /wp-content/languages/plugins/.

Importing Items from Square

If you encounter issues when importing items from Square, consider the following:

  • Is the Square product assigned to the Location configured in the plugin settings? Remember, this plugin only supports one Square Location. Hence, if some products aren’t syncing as expected, please double-check to ensure they’re in the Square Location defined in the plugin settings.
  • Are SKUs set in Square for the items you want to import? Items must have a SKU to match items between systems during the product data sync process.
  • Does your site support background processing? Background processing is crucial for successfully syncing product data between Square and WooCommerce. Additionally, various other WooCommerce features/plugins also require background processing. If your site fails, contact your host to enable background processing/loopback connections. Although some hosts might consider this a security issue, using a loopback connection doesn’t pose any security threat. If implemented correctly, it won’t increase server usage. Quality hosts will handle any increase in server usage through rate limiting.
See also  Charge WooCommerce Shipping Per Item

Issues with Square Payment Gateway

If you’re unable to process payments using the Square gateway, consider the following:

  • Does your site have an SSL certificate? To use the Square payment gateway, it is essential to have an SSL certificate installed on your site. You can learn more about SSL certificates here.
  • Does your site currency match your Square account currency? Square and WooCommerce must be set to the same currency in order to use the gateway. You can set your WooCommerce store currency from WooCommerce > Settings > General. Your Square location currency is determined by the country selected during account creation.
  • Is your shop located in a supported country? Square only accepts transactions from specific countries: US, CA, UK, AU, IR, ES, FR, and JP. If your shop is located in a different country, you won’t be able to process transactions with Square. You can view and modify your shop location from WooCommerce > Settings > General.
  • Is your transaction type set to “Authorization”? Authorizations will not appear in the Square “Transactions” list until you capture the charge within WooCommerce.
  • Did the payment fail with an error code in the order notes or in the logs? Refer to the common error codes returned by Square in their documentation.
  • Are your payment methods, such as the credit card field, not loading correctly? Site optimization plugins often minify the code of extensions, potentially introducing breaking changes to Square. Please exclude the extension from any optimization and minification rules.

Issues with Authorizations

If you encounter issues with authorizations, keep the following in mind:

  • Square authorizations are only valid for 6 days. After this time frame, the authorization can no longer be captured, disabling the capture action. If you haven’t captured the charge within this time frame, you must obtain a new authorization from the customer.
  • You should revoke authorizations within WooCommerce when possible. Although Square is aware of changes in WooCommerce, WooCommerce is not aware of changes within Square. For any transaction originating in WooCommerce, make additional changes (such as voiding / revoking authorizations and processing refunds) within WooCommerce.
See also  Introducing Atum: The Ultimate Inventory Management Solution for Woocommerce

Troubleshooting Apple Pay Display

If you’ve enabled Digital Wallets but the Apple Pay button isn’t being displayed, consider the following:

  • Are there any admin notices related to Apple Pay on the Square settings page?
  • Has your domain been verified with Square/Apple? To ensure your domain is verified in Square, follow the steps provided in our Digital Wallet Apple Pay Setup section. Enabling Square logging (found in WooCommerce > Settings > Square) will log the response received when attempting to register your domain, aiding in troubleshooting any errors.
  • Are you viewing your store from a supported browser or device? Apple Pay is only available on Safari and supported Apple devices.
  • Do you have a valid card in your Apple Wallet?

Legacy sandbox mode can still be enabled via the constant below, but it is advised to use the setting provided above as the constant may be removed in the future.

define( 'WC_SQUARE_SANDBOX', true );

Please add the above constant in your preferred method. If using wp-config.php, add it before the line that says “/ That’s all, stop editing! Happy blogging. /”.

For more information, please refer to the Frequently Asked Questions guide.