• Resolved sajidsynclarity

    (@sajidsynclarity)


    I got the error in status log when try to make credit card payments.

    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.17
    WordPress Version 6.2.2
    WooCommerce Square Version 3.8.3

Viewing 3 replies - 1 through 3 (of 3 total)
  • 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

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

    Assistance with troubleshooting can be provided by tools such as 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 is also available for this purpose.

    Let us know how that goes for you.

    Thread Starter sajidsynclarity

    (@sajidsynclarity)

    Thanks for your reply.
    Actually, my issue is resolved after downgrading PHP version to 7.4.

    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.