Open pogla opened 1 year ago
Same issue happening on one of my client's sites. Now that PHP 7.x is fully deprecated, this is a high priority issue!
@dallendalton Is this repo still active?
@slewisma Did you try to update WooCommerce to the latest version? I did and it looks like this issue is gone.
I think this commit solved the issue of the function returning an empty string: https://github.com/woocommerce/woocommerce/commit/ad30c6146396c264c4d7c4e55bfcf29ea84df175#diff-8261b720d84fcccf0d768b1a4114051cd1d52a4661b320a28b5144abefaf41c8R668
I'm getting a fatal error running this plugin in PHP 8. The problem seems to be in this function: https://github.com/taxjar/taxjar-woocommerce-plugin/blob/master/includes/TaxCalculation/class-order-tax-applicator.php#L209-L215
This seems to fix the problem:
$order->get_shipping_total
and$order->get_shipping_tax
both return a string or null.Here is the error: