• Resolved webexpert10

    (@webexpert10)


    I have been working on a woocommerce store from few months and recently came across an odd bug. I have an order that when attempting to look at it through the admin interface or otherwise causes PHP to crash.

    After some digging, I found that the problem is due to an infinite loop; the WC_Order constructor calls WC_Order_Data_Store_CPT->read_order_data, which contains the line

    ‘transaction_id’ => get_post_meta( $id, ‘_transaction_id’, true ),

    however, for the problematic order, the value of _transaction_id in the wp_postmeta table is “O:8:”WC_Order”:1:{s:5:”*id”;i:31820;}”, which seems to be a serialized WC_Order object. Loading it causes an infinite loop in the constructor.

    I’m not sure how or why the value of _transaction_id is the serialized object for this order. The order was originally paid using the “PayPal Express Checkout for WooCommerce” plugin.

    Currently I have set ‘_transaction_id’ manually from database. Can you please provide me its permanent solution so it will not occur in future.

    Looking forward to hear from you.

    • This topic was modified 5 years, 5 months ago by webexpert10.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘PHP crash due to WC_Order stored in _transaction_id woocommerce’ is closed to new replies.