Product Feed PRO: XML parser runs on CSV _tmp file (simplexml_load_file warnings
-
Hi team,
When generating a CSV feed, the plugin logs repeated warnings because
simplexml_load_file() is called on a temporary CSV file (_tmp.csv).Redacted log:
[2025-08-20 18:21:39 UTC] PHP Warning: simplexml_load_file():
/wp-content/uploads/woo-product-feed-pro/csv/_tmp.csv:1:
parser error : Start tag expected, ‘<‘ not found
in /wp-content/plugins/woo-product-feed-pro/classes/class-get-products.php on line 755
[2025-08-20 18:21:39 UTC] PHP Warning: simplexml_load_file():
[id,title,description,availability,condition,price,link,image_link,sale_price, …]
in /wp-content/plugins/woo-product-feed-pro/classes/class-get-products.php on line 755
[2025-08-20 18:21:39 UTC] PHP Warning: simplexml_load_file(): ^
in /wp-content/plugins/woo-product-feed-pro/classes/class-get-products.php on line 755Facts:
- Feed format is CSV, stored under /uploads/woo-product-feed-pro/csv/
- The temp file begins with UTF-8 BOM + “id,title,…” (valid CSV)
- Despite CSV, an XML validation step runs and triggers the warnings
- Final CSV (without _tmp) is created, but logs get spammed and sync can stall
Steps to reproduce:
1) Create a CSV feed in Product Feed PRO.
2) Click Generate/Regenerate.
3) While _tmp.csv exists, plugin calls simplexml_load_file() on it.Expected:
- XML parsing should run only for XML feeds (or files starting with ‘<‘)
- CSV files—especially *_tmp.csv—should be skipped
Environment/notes:
- WooCommerce + Action Scheduler active
- Page cache excluded for /wp-json/* and /wp-admin/admin-ajax.php
- Cron is working (jobs run)
Could you guard the XML parse by extension/first byte and ignore _tmp. files for CSV outputs?
Happy to test a patched build. Thanks!The page I need help with: [log in to see the link]
You must be logged in to reply to this topic.