• Resolved khff

    (@khff)


    I am getting this error:
    PHP Warning: Attempt to read property “order_awaiting_payment” on null in /home/khff/public_html/wp-content/plugins/woocommerce/includes/wc-cart-functions.php on line 187

    This is the block it is referring to:

    Woocommerce support hasn’t even acknowledged my existence, I have googled it but didn’t see anything that seemed like it might fix the issue. The cart seems to be working, but we are about to launch our big yearly sale and there isn’t enough scotch in the world to help me if this causes issues during the sale.

    Can anyone help please?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support Rajesh K. (woo-hc)

    (@rajeshml)

    Hello @khff,

    Thank you for reaching out to WooCommerce support. We’re sorry to hear you’re experiencing this error and appreciate your patience.

    I’d like to learn more about this issue, are you having trouble with orders being placed? Which payment method are you using? Does this happen for all the orders or sporadically?

    In the meantime, I’d like to understand your site properly. Please share with us the necessary information below for us to investigate the issue further:

    • System Status Report?which you can find via WooCommerce > Status > Get system report > Copy for support.
    • Fatal error logs?(if any) under WooCommerce > Status > Logs.

    You could copy and paste your reply here or paste it via https://gist.github.com/ and send the link here.

    Once we have more information, we’ll be able to assist you further.

    Thanks!

    Thread Starter khff

    (@khff)

    Hi,

    It doesn’t seem to be affecting any functions, just creates a long list of errors in the error log, seems to log at least 2-5 times a second in the log at times, but then only every second other times. There is another issue with our store notices, that when I turn the store notices back on, it makes the above issue stop happening. I am sure you will see it all in the logs. Here is a link to the error logs in dropbox, let me know if you have any issues accessing them.

    https://www.dropbox.com/scl/fo/ykok03k5kkwnarbn161w4/AOnJnfSAPPFM3L6DkeUrjpQ?rlkey=3e9yoba2h3pywczryvyto0d71&dl=0

    anastas10s

    (@anastas10s)

    Hi @khff

    Thank you for reaching back, with further details on this.

    The PHP warning “Attempt to read property ‘order_awaiting_payment’ on null” indicates that the code is trying to access a property of an object that is currently null. This usually happens when an object or variable is not properly initialized or is not in the expected state.

    From the site’s System Status Report (SSR), Afterpay is the only payment gateway I can see active, and there is order status manipulation functionality installed, also.

    Feel free to reach out to their respective support channels, about this, as they would be in a better position to assist you.

    Moreover, based on what appears in the error logs about memory being exhausted, best to increase the values of the site’s PHP time limit, that of PHP Post Max and the WP Memory limit.

    I hope this helps! Let us know it goes.

    Thread Starter khff

    (@khff)

    Thanks for your reply. I will contact Afterpay and see what they can do. We also have Commbank Simplify as a payment gateway so weird it isn’t showing up.

    My partner is our host and he has increased the memory on everything he can. I thought that we had got those errors sorted as they had stopped showing up in the logs in cpanel. I will have another look though.

    Thanks once again, I will mark this as resolved for now.

    Plugin Support Zubair Zahid (woo-hc)

    (@doublezed2)

    Hello khff

    Thank you for your reply.

    Please let me know about the response from Afterpay.

    If you find a solution, do share it with us here.
    It would be very helpful for the Woo community.

    Have a great day!

    Thread Starter khff

    (@khff)

    I found the issue, it didn’t like express checkout for Afterpay being on the cart page. I disabled it so you have to actually go to the checkout page and select Afterpay. No more errors in the cPanel log and it also fixed another issue that I didn’t realise was related where AP orders would process in the back end and through AP, but the customer would receive an error saying something went wrong.

    I still have a support ticket in with AP for the above issue so I will wait for them to get back to me and let them know. This was happening before the latest versions of Woo and WP so I don’t think it was to do with them.

    Hopefully this does help someone else as I was tearing my hair out with it.

    Plugin Support Rajesh K. (woo-hc)

    (@rajeshml)

    Hello @khff,

    Thank you for sharing the resolution to the issue you were experiencing with Afterpay and WooCommerce!

    We appreciate your diligence in troubleshooting and your willingness to share your findings with us and potentially others who may face similar issues. Your contribution to the community is valuable!

    Please let us know if there’s anything else we can do to help or if you have any questions.

    Cheers!

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.