Title: Uncaught DivisionByZeroError: Division by zero
Last modified: June 9, 2023

---

# Uncaught DivisionByZeroError: Division by zero

 *  Resolved [sajidsynclarity](https://wordpress.org/support/users/sajidsynclarity/)
 * (@sajidsynclarity)
 * [3 years ago](https://wordpress.org/support/topic/uncaught-divisionbyzeroerror-division-by-zero/)
 * I got the error in status log when try to make credit card payments.
 *     ```wp-block-code
       CRITICAL Uncaught DivisionByZeroError: Division by zero in /var/www/wp-content/plugins/woocommerce-square/includes/Gateway/API/Requests/Orders.php:326
       ```
   
 * I am using
   PHP Version 8.1.17WordPress Version 6.2.2WooCommerce Square Version
   3.8.3

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

 *  [Igor H](https://wordpress.org/support/users/ihereira/)
 * (@ihereira)
 * [2 years, 12 months ago](https://wordpress.org/support/topic/uncaught-divisionbyzeroerror-division-by-zero/#post-16812858)
 * Hello,
 * This could be caused by a conflict with your theme or with another plugin. You
   can learn more about plugin and theme conflicts in our [Self-Service Guide](https://docs.woocommerce.com/document/woocommerce-self-service-guide/).
   **
   How to test for conflicts**To help you to identify the cause of the issue, please
   follow these steps:
    1. Temporarily change your theme to [Storefront](https://www.woocommerce.com/storefront/)
       or Twenty Twenty-Three theme.
    2. Attempt to replicate the issue. If the issue is resolved, the conflict lies 
       with the theme. If the problem persists, continue to the following steps.
    3. Temporarily deactivate all plugins except WooCommerce and Square, either manually
       or with a plugin helper tool.
    4. Attempt to replicate the issue once more. If the issue is resolved, the conflict
       lies with a plugin.
    5. To determine which plugin is causing the conflict, reactivate your other plugins
       one at a time, testing for the issue after each activation.
 * Learn more: [How to test for plugin and theme conflicts](https://docs.woocommerce.com/document/how-to-test-for-conflicts/).
 * Assistance with troubleshooting can be provided by tools such as [Meks Quick Plugin Disabler](https://wordpress.org/plugins/meks-quick-plugin-disabler/),
   which remembers previously active plugins when reactivated. Also, you can clone
   your site to a staging environment for testing without affecting your live site
   or customers. Several hosting providers offer staging facilities, so it’s worth
   checking with your host. The free [WP Staging plugin](https://wordpress.org/plugins/wp-staging/)
   is also available for this purpose.
 * Let us know how that goes for you.
 *  Thread Starter [sajidsynclarity](https://wordpress.org/support/users/sajidsynclarity/)
 * (@sajidsynclarity)
 * [2 years, 12 months ago](https://wordpress.org/support/topic/uncaught-divisionbyzeroerror-division-by-zero/#post-16813994)
 * Thanks for your reply.
   Actually, my issue is resolved after downgrading PHP version
   to 7.4.
 *  [Igor H](https://wordpress.org/support/users/ihereira/)
 * (@ihereira)
 * [2 years, 12 months ago](https://wordpress.org/support/topic/uncaught-divisionbyzeroerror-division-by-zero/#post-16815702)
 * Hi,
 * Glad to know that you figured this out.
 * I’ll mark this thread as **resolved **now. If you have any further questions,
   I recommend creating a new thread.
 * Best.

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

The topic ‘Uncaught DivisionByZeroError: Division by zero’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce-square/assets/icon-256x256.png?rev=3234354)
 * [WooCommerce Square](https://wordpress.org/plugins/woocommerce-square/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce-square/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce-square/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce-square/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce-square/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce-square/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Igor H](https://wordpress.org/support/users/ihereira/)
 * Last activity: [2 years, 12 months ago](https://wordpress.org/support/topic/uncaught-divisionbyzeroerror-division-by-zero/#post-16815702)
 * Status: resolved