Title: Error Undefined array key 0 image-swap.php
Last modified: May 7, 2023

---

# Error Undefined array key 0 image-swap.php

 *  Resolved [weberinfosp](https://wordpress.org/support/users/weberinfosp/)
 * (@weberinfosp)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/error-undefined-array-key-0-image-swap-php/)
 * I’m getting the error Warning: Undefined array key 0 in \wp-content\themes\oceanwp\
   woocommerce\loop\thumbnail\image-swap.php online 45, no thumbnails on related
   products
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ferror-undefined-array-key-0-image-swap-php%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 7 replies - 1 through 7 (of 7 total)

 *  [Shahin](https://wordpress.org/support/users/skalanter/)
 * (@skalanter)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/error-undefined-array-key-0-image-swap-php/#post-16718614)
 * Hello [@weberinfosp](https://wordpress.org/support/users/weberinfosp/),
 * I didn’t see the related products on your URL.
 * We need to know the steps to reproduce.
    Would you please provide us with some
   screenshots or a short video of the errors you faced step by step?
 * You can upload your files to one of the following online services:
    [https://postimages.org](https://postimages.org)
   [https://loom.com](https://loom.com) [https://drive.google.com](https://drive.google.com)
   [https://wetransfer.com](https://wetransfer.com) [https://dropbox.com](https://dropbox.com)
   Or any other service you know.
 * Also, please provide us with your system environment information. Please navigate
   to WP Dashboard > OceanWP > OceanWP Panel > System Info: [https://i.postimg.cc/0QZrGq46/system-info.png](https://i.postimg.cc/0QZrGq46/system-info.png).
   You can send the information as code here or upload them to [http://pastebin.com/](http://pastebin.com/)
   and get an exclusive link.
 * Please keep us posted.
    Thank you, Best Regards
 *  Thread Starter [weberinfosp](https://wordpress.org/support/users/weberinfosp/)
 * (@weberinfosp)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/error-undefined-array-key-0-image-swap-php/#post-16719542)
 * Sorry I had disabled this option (related products) I already enabled it and 
   follow the data.
 * [https://postimg.cc/qNzxyYsH](https://postimg.cc/qNzxyYsH)
 *     ```wp-block-code
       WordPress Environment
   
       Home URL: https://nossamegashop.com.br/Site URL: https://nossamegashop.com.br/WP Version: 6.2WP Multisite: False NoFront Page Display: pageFront Page: Home (#396)Posts Page: Blog (#31)WP Memory Limit: 128 MBWP Upload Limit: 128MWP Debug Mode: False DisabledThe Main WP Directory: True WritableThe wp-content Directory: True WritableThe uploads Directory: True WritableThe plugins Directory: True WritableThe themes Directory: True Writable
   
       Theme
   
       Name: OceanWPVersion: 3.4.3Author URL: https://oceanwp.org/about-oceanwp/Child Theme: False No
   
       Server Environment
   
       Server Info: Microsoft-IIS/10.0Localhost Environment: False NoPHP Version: 8.2.1PHP Memory Limit: 512 MBPHP Post Max Size: 128 MBPHP Time Limit: 300PHP Max Input Vars: 10000PHP Display Errors: False DisabledMySQL Version: 8.0.29Max Upload Size: 128 MBPHP XML: TrueMBString: TrueSimpleXML: TrueFsockopen/cURL: TrueSoapClient: False Your server does not have the SOAP Client class enabled - some gateway plugins which use SOAP may not work as expected.DOMDocument: False Your server does not have the DOMDocument class enabled - HTML/Multipart emailsand also some extensionswill not work without DOMDocument.
   
       GZip: False Your server does not support the gzopen function - this is required to use the GeoIP database from MaxMind. The API fallback will be used instead for geolocation.Zip Archive: TrueIconv: TrueHTTP Requests: TrueCommunication with oceanwp.org: True
   
       Active Plugins (14)
   
       Additional Variation Images Plugin for WooCommerce: by AA-Team – 1.5.1Elementor Pro: by Elementor.com – 3.12.3Elementor: by Elementor.com – 3.12.2FluentSMTP: by Equipe FluentSMTP & WPManageNinja – 2.2.4Fluent Forms: by Contact Form - WPManageNinja LLC – 4.3.25Ocean Custom Sidebar: by OceanWP – 1.1.0Ocean Extra: by OceanWP – 2.1.6Ocean Product Sharing: by OceanWP – 2.0.5Ocean Social Sharing: by OceanWP – 2.0.3Ocean Stick Anything: by OceanWP – 2.0.5TI WooCommerce Wishlist: by TemplateInvaders – 2.4.3WooCommerce: by Automattic – 7.6.1WZone - WooCommerce Amazon Affiliates: by AA-Team – 13.8.7WP Rocket: by WP Media – 3.13.1
       ```
   
 *  [Shahin](https://wordpress.org/support/users/skalanter/)
 * (@skalanter)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/error-undefined-array-key-0-image-swap-php/#post-16721919)
 * Hello [@weberinfosp](https://wordpress.org/support/users/weberinfosp/),
 * Thank you for sharing the details.
 * I am not sure how this problem appears. While we should be able to reproduce 
   it on our end, please check the troubleshooting steps described below and let
   us know the result.
 * **Part A:**
    It could be related to the version of PHP; while WordPress recommended
   using PHP version 8.1.x, please try to check the issue with PHP version 8.1 –
   you can ask your host provider to change the PHP version on your host.
 * **Part B:**
    For troubleshooting plugins, please do the following steps and let
   me know the results:
 * 1. Head over to WP Dashboard > Plugin.
    2. Deactivate all plugins. 3. Then, first,
   activate the Ocean Extra plugin. 4. Check your issue. 5. Then, activate your 
   plugins one by one 6. After activation of any plugins, check your issue
 * Note 1: You can try troubleshooting on the staging website/or on a fresh installation.
 * Note 2: If you have any cache plugin or server cache(CDN / Browser Cache and 
   Cookies and …), you need to clear its cache contents or disable them to see your
   changes. Also, remember to click on the regenerate all assets file and data in
   Elementor > Tools(if you have Elementor).
 * **Please Note:**
    Since it’s just a warning and does not hurt your website, you
   can turn off your WordPress debugger to hide it: [https://wordpress.org/support/article/debugging-in-wordpress/#wp_debug](https://wordpress.org/support/article/debugging-in-wordpress/#wp_debug).
   However, this topic has been forwarded to the developer team to check it deeply,
   and if we find the issue, we’ll fix it in the next updates.
 * Also, if you find out how we can reproduce the issue, please share your steps
   to arrive the issue on a fresh WordPress. It’ll help us to solve this warning
   asap.
 * Please keep us posted.
    Thank you, Best Regards
 *  Thread Starter [weberinfosp](https://wordpress.org/support/users/weberinfosp/)
 * (@weberinfosp)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/error-undefined-array-key-0-image-swap-php/#post-16723061)
 * Hello again thanks for answering, I had already tested it with version 8.1 and
   it continues, I downgraded it to 8.0 and it continued, I disabled all plugins
   except woozone (amazon affiliates) because without it the theme does not appear
   in the images, but to my surprise the theme recommended by woozone (kingdom) 
   doesn’t have this problem, but I can’t use it because it’s very bad, without 
   support it’s all outdated (it seems the team stopped updating) I have a ticket
   open and they don’t respond, I loved the OceanWP theme a professional theme even
   though it is free (congratulations to the developers) and now I don’t know what
   to do because I depend on the woozone plugin to sell, very sad about that, because
   I would like to use all OceanWP features and if I disable this function I lose
   SEO
 *  Thread Starter [weberinfosp](https://wordpress.org/support/users/weberinfosp/)
 * (@weberinfosp)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/error-undefined-array-key-0-image-swap-php/#post-16723946)
 * This error appears even with Debug False
 *  [Shahin](https://wordpress.org/support/users/skalanter/)
 * (@skalanter)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/error-undefined-array-key-0-image-swap-php/#post-16725147)
 * Hello [@weberinfosp](https://wordpress.org/support/users/weberinfosp/),
 * Since you also posted about this problem on our Support Group and since the conversation
   is taking place there, I’m posting this reply for everyone else reading it and
   thinking they might have the same problem.
 * The issue is unrelated to OceanWP or WooCommerce itself, but to a third-party
   premium plugin for affiliate links.
 * Unfortunately, per WordPress forum rules as well as our own support policy, we’re
   not in the position to provide support for third-party plugins here, especially
   premium ones.
 * Please read the forum guidelines: [https://wordpress.org/support/guidelines/#the-bad-stuff](https://wordpress.org/support/guidelines/#the-bad-stuff)?
 * Thank you for understanding,
    Best Regards
    -  This reply was modified 3 years, 1 month ago by [Shahin](https://wordpress.org/support/users/skalanter/).
 *  Thread Starter [weberinfosp](https://wordpress.org/support/users/weberinfosp/)
 * (@weberinfosp)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/error-undefined-array-key-0-image-swap-php/#post-16727372)
 * Ok thanks

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Error Undefined array key 0 image-swap.php’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/oceanwp/4.1.6/screenshot.png)
 * OceanWP
 * [Support Threads](https://wordpress.org/support/theme/oceanwp/)
 * [Active Topics](https://wordpress.org/support/theme/oceanwp/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/oceanwp/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/oceanwp/reviews/)

 * 7 replies
 * 2 participants
 * Last reply from: [weberinfosp](https://wordpress.org/support/users/weberinfosp/)
 * Last activity: [3 years, 1 month ago](https://wordpress.org/support/topic/error-undefined-array-key-0-image-swap-php/#post-16727372)
 * Status: resolved