• Resolved efox

    (@foxylearning)


    I just noticed that this plugin generates a PHP fatal error (division by zero) in my site logs when I process a partial refund in WooCommerce. The error does not seem to impact anything on the frontend, but figured I would report it here just in case:

    2023-01-01 14:24:23.943454 [NOTICE] [11926] [149.28.11.90:45268#mysite.com] [STDERR] PHP Fatal error:  Uncaught DivisionByZeroError: Division by zero in /var/www/mysite.com/htdocs/wp-content/plugins/simple-sales-tax/includes/class-sst-order.php:841
    Stack trace:
    #0 /var/www/mysite.com/htdocs/wp-content/plugins/simple-sales-tax/includes/class-sst-order.php(716): SST_Order->prepare_refund_items()
    #1 /var/www/mysite.com/htdocs/wp-content/plugins/simple-sales-tax/includes/class-sst-order-controller.php(100): SST_Order->do_refund()
    #2 /var/www/mysite.com/htdocs/wp-includes/class-wp-hook.php(308): SST_Order_Controller->refund_order()
    #3 /var/www/mysite.com/htdocs/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters()
    #4 /var/www/mysite.com/htdocs/wp-includes/plugin.php(517): WP_Hook->do_action()
    #5 /var/www/mysite.com/htdocs/wp-content/plugins/woocommerce/includes/wc-order-functions.php(645): do_action()
    #6 /var/www/mysite.com/htdocs/wp-content/plugins/woocommerce/includes/class-wc-ajax.php(2024): wc_create_refund()
    #7 /var/www/mysite.com/htdocs/wp-includes/class-wp-hook.php(308): WC_AJAX::refund_line_items()
    #8 /var/www/mysite.com/htdocs/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters()
    #9 /var/www/mysite.com/htdocs/wp-includes/plugin.php(517): WP_Hook->do_action()
    #10 /var/www/mysite.com/htdocs/wp-admin/admin-ajax.php(188): do_action()
    #11 {main}
      thrown in /var/www/mysite.com/htdocs/wp-content/plugins/simple-sales-tax/includes/class-sst-order.php on line 841
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Brett Porcelli

    (@bporcelli)

    Thanks for reporting this issue! I am working on a solution to be included in Simple Sales Tax version v7.0.5.

    In the meantime, you should be able to process this partial refund by entering a quantity greater than zero for each item you are refunding.

    Plugin Author Brett Porcelli

    (@bporcelli)

    This has been fixed in Simple Sales Tax v7.0.5. Thanks again for the report!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Fatal error on partial refund’ is closed to new replies.