Title: PHP 8 error, low bug
Last modified: April 16, 2026

---

# PHP 8 error, low bug

 *  [yukiko-kawa](https://wordpress.org/support/users/yukiko-kawa/)
 * (@yukiko-kawa)
 * [1 month, 1 week ago](https://wordpress.org/support/topic/php-8-error-low-bug/)
 * I’d like to report a bug with reloaded product pages on the site.
   It doesn’t 
   appear for normal pages, but for those that have been reloaded and not updated.
 * I just wanted to let you know about the error, which appears to be a common PHP
   8 incompatibility.
 * 
   ERROR:
 * Uncaught Error: json_decode(): Argument #1 ($json) must be of type string, array
   given
   in **product-variations-swatches-for-woocommerce/includes/frontend/frontend.
   php** on line **146**
 * Call stack:
    1. `json_decode()`
       /product-variations-swatches-for-woocommerce/includes/frontend/
       frontend.php:146
    2. `VI_WOO_PRODUCT_VARIATIONS_SWATCHES_Frontend_Frontend::variation_attribute_options_html()`
       
       wp-includes/class-wp-hook.php:341
    3. `WP_Hook::apply_filters()`
       wp-includes/plugin.php:205
    4. `apply_filters()`
       /woocommerce/includes/wc-template-functions.php:3595
    5. `wc_dropdown_variation_attribute_options()`
       woocommerce/templates/single-product/
       add-to-cart/variable.php:41
    6. ….

Viewing 1 replies (of 1 total)

 *  Plugin Author [mytrinh](https://wordpress.org/support/users/mytrinh/)
 * (@mytrinh)
 * [1 month, 1 week ago](https://wordpress.org/support/topic/php-8-error-low-bug/#post-18882099)
 * Hi,
 * Thank you for reaching out to us. 
   I’ve checked and can confirm that the plugin
   is compatible with PHP 8.It looks like this might be a compatibility issue. Could
   you please [create a support ticket](https://villatheme.com/knowledge-base/how-to-create-tickets-on-villathemes-forum/)
   in [our Support Forum](https://villatheme.com/supports/forum/presale/)? We’ll
   jump in and check it out for you right away.
 * Best regards.
    -  This reply was modified 1 month, 1 week ago by [mytrinh](https://wordpress.org/support/users/mytrinh/).

Viewing 1 replies (of 1 total)

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fphp-8-error-low-bug%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://ps.w.org/product-variations-swatches-for-woocommerce/assets/icon-
   256x256.gif?rev=3080890)
 * [Product Variations Swatches for WooCommerce](https://wordpress.org/plugins/product-variations-swatches-for-woocommerce/)
 * [Support Threads](https://wordpress.org/support/plugin/product-variations-swatches-for-woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/product-variations-swatches-for-woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/product-variations-swatches-for-woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/product-variations-swatches-for-woocommerce/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [mytrinh](https://wordpress.org/support/users/mytrinh/)
 * Last activity: [1 month, 1 week ago](https://wordpress.org/support/topic/php-8-error-low-bug/#post-18882099)
 * Status: not a support question