Hi @priyam1234,
Thanks for opening your own topic, it really helps keep things clear and allows us to focus directly on what is happening on your setup. I can see how running into this fatal error during the XML export would be concerning, especially when you are expecting the export tool to work smoothly. I am here to help you look into this.
Based on what you described, this matches a similar pattern we have been troubleshooting with another user, where the export stops working only when WooCommerce is active. Since this is not yet a confirmed issue, we need to gather a bit more information so we can properly understand what is causing WooCommerce to interfere with the export process on WordPress 6.9.
To move forward, could you clarify when you first noticed this happening? Was the export tool working fine before and only stopped after a recent update, or is this a brand new site setup where the XML export has never worked with WooCommerce enabled? That will help us narrow things down.
Please also share the following so we can review your setup in detail:
Once I have these details, I will check everything closely and guide you through the next steps. Happy to continue digging into this with you.
Hi @lovingbro,
I would like to explain the issue in detail.
To investigate further, I performed a fresh installation of WordPress 6.9 on PHP 8.4.
When I exported the XML file immediately after installation, it worked successfully.
Next, I installed the WooCommerce plugin and tried exporting again. The export still worked without any issues.
However, after creating a new product, attempting to export the XML resulted in a critical error:
Uncaught TypeError: wp_is_valid_utf8(): Argument #1 ($bytes) must be of type string, null given.
I added debugging logs and identified that the error occurs when any product meta value is NULL.
During XML generation, WordPress attempts to wrap the meta value inside a CDATA tag, but NULL values cause wp_is_valid_utf8() to throw a fatal error in PHP 8.4 due to strict typing.
It appears that in the new WordPress/PHP flow, exporting meta fields that contain a NULL value is no longer handled gracefully.
I hope this information helps you pinpoint the issue.
For reference, here is my system report: https://limewire.com/d/4hUQ7#HUcQt6wVLM
I encountered this issue today while exporting data. My previous export (done last month, before the WordPress update) worked without problems.
Thank you.
Hi @lovingbro,
I investigated the issue in more depth and confirmed that it is not related to the WooCommerce plugin.
This problem actually occurs in WordPress core itself.
The critical error happens in both scenarios — with or without WooCommerce installed.
The only difference is that WooCommerce interrupts the process and displays a critical error message, while without WooCommerce, the error appears directly inside the generated XML file.
You can reproduce this issue by creating any post or page and setting one of its meta field values to NULL. WordPress attempts to export that meta value and triggers the same fatal error.
Hi @lovingbro,
Here is the ticket I have opened in the WordPress support system:
https://core.trac.wordpress.org/ticket/6434
This issue is not caused by your plugin.
Apologies for the inconvenience.
Hi @priyam1234,
I appreciate you taking the time to share this detailed update, your findings, and the WordPress core ticket you opened at https://core.trac.wordpress.org/ticket/64347. Your follow-up really helps bring clarity to how this behaves in different setups, and it is great to know you traced it back to WordPress core itself. Since this is not caused by WooCommerce, I will go ahead and mark this thread as resolved on our end.
If the support you received here has been helpful in any way, a quick review of WooCommerce would mean a lot to our team and the wider community. You can leave one at https://wordpress.org/support/plugin/woocommerce/reviews/#new-post.
Wishing you a smooth continuation as the core team works toward a fix.