Hi @markisu72,
From the code you have shared there’s no mention of the “length” key mentioned in the notice. That notice comes up when you are trying to access an array key that doesn’t exist so I would look at any other snippets that might be using the key “length” if you are still getting this notice with just the code you mentioned above.
You mentioned it’s only happening on WooCommerce product pages so if you have any WooCommerce-related snippets that’s the first place I would look at, you should be able to adjust the code adding a check for the “length” key.
This is not related to the PHP version or specific to WPCode as it seems to be happening when executing a snippet of code.
If you can share more of the code of the snippets you have active on your site I’d be happy to help pinpoint the issue, please reach out using the form at if you want to share code privately.
