Title: Explode Argument Error expected type (string) got (array)
Last modified: December 6, 2024

---

# Explode Argument Error expected type (string) got (array)

 *  Resolved [Kendall Arneaud](https://wordpress.org/support/users/icecappacino/)
 * (@icecappacino)
 * [1 year, 3 months ago](https://wordpress.org/support/topic/explode-argument-error-expected-type-string-got-array/)
 * I’ve recently had a hardware( hosting from **PHP 7** to **8.1**) and software
   update ( theme and woocommerce from** 6.xx/8.xx** to **9.4.3**) and although 
   I can access all areas of the frontend I can explore all areas of the backend
   except the **Products List** Page ( I can add edit update but not view list).
   Errors logs show
   `Uncaught TypeError: explode(): Argument #2 ($string) must be
   of type string, array given in wp-content/plugins/woocommerce/includes/data-stores/
   class-wc-product-data-store-cpt.php:475 `
 * Error have a similar pattern and are related to product information, variations
   etc.
   My Setup is [](https://pastebin.com/vh5wjBzh)[WordPress SSR – Pastebin.com](https://pastebin.com/V6aJ3JB3)
   I have tried clearing the transients / updating the tables( kept saying its complete
   and verifying is successful) and regenerating the product attributes( stuck at“
   Filling 300”) But to no avail. I’m at the point to do a backup but not without
   trying to export the products which is giving me errors because of it.Any advice
   on how to proceed with solving this problem? I tried going line by line but as
   fast as I solve one problem another one pops up( similar error “product” related
   code)

Viewing 1 replies (of 1 total)

 *  [Jonayed (woo-hc)](https://wordpress.org/support/users/jonayedhosen/)
 * (@jonayedhosen)
 * [1 year, 3 months ago](https://wordpress.org/support/topic/explode-argument-error-expected-type-string-got-array/#post-18186241)
 * Hi [@icecappacino](https://wordpress.org/support/users/icecappacino/) ,
 * Thanks for providing the SSR! 
   It seems the error is related to how WooCommerce
   is handling product data after recent updates, specifically in the `class-wc-
   product-data-store-cpt.php` file. The `explode()` function is expecting a string
   but is receiving an array, which is likely causing the issue.
 * To troubleshoot further, please try the following steps to see if they resolve
   the issue:
    - Deactivate all plugins except WooCommerce and switch to the default WooCommerce
      Storefront theme.
    - Temporarily disable any custom attributes created for a product.
    - Regenerate product lookup tables via **WooCommerce > Status > Tools**.
    - Make sure all plugins are updated to their latest versions and compatible 
      with PHP 8.
    - Clear transients and regenerate them via **WooCommerce > Status > Tools**.
    - Temporarily downgrade the PHP version to one slightly below 8.0.
 * Let us know how it goes or if you need further assistance!

Viewing 1 replies (of 1 total)

The topic ‘Explode Argument Error expected type (string) got (array)’ is closed 
to new replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3234504)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

## Tags

 * [products](https://wordpress.org/support/topic-tag/products/)
 * [update](https://wordpress.org/support/topic-tag/update/)
 * [upgrade](https://wordpress.org/support/topic-tag/upgrade/)

 * 1 reply
 * 2 participants
 * Last reply from: [Jonayed (woo-hc)](https://wordpress.org/support/users/jonayedhosen/)
 * Last activity: [1 year, 3 months ago](https://wordpress.org/support/topic/explode-argument-error-expected-type-string-got-array/#post-18186241)
 * Status: resolved