Title: Undefined array key 2&#8243; Error in class_ycve_admin.php
Last modified: February 21, 2025

---

# Undefined array key 2″ Error in class_ycve_admin.php

 *  Resolved [bulls_shark](https://wordpress.org/support/users/bulls_shark/)
 * (@bulls_shark)
 * [1 year, 3 months ago](https://wordpress.org/support/topic/undefined-array-key-2-error-in-class_ycve_admin-php/)
 * Hello,
 * I am experiencing an issue with the “Variation Auto Expire for WooCommerce” plugin
   on my website. A PHP warning appears when saving product variations, indicating
   an “undefined array key 2.” The full error message is as follows:
   Warning: Undefined
   array key 2 in wp-content/plugins/variation-auto-expire-for-woocommerce/admin/
   class_ycve_admin.php on line 143
 * The error occurs when saving variations of a product, both in the backend and
   when saving via AJAX (triggered by `wp_ajax_woocommerce_save_variations`).
 * **Error Message:**
 * Object
   component: “Plugin: variation-auto-expire-for-woocommerce”file: “wp-content/
   plugins/variation-auto-expire-for-woocommerce/admin/class_ycve_admin.php”key:“
   44ab36dbd58769a96bc003ba0da43226”line: 143message: “Undefined array key 2”stack:(
   5) [‘Ycve\Variation\Ycve_Admin->ycve_save_exp_date_variations()’, “do_action(‘
   woocommerce_save_product_variation’)”, ‘WC_Meta_Box_Product_Data::save_variations()’,‘
   WC_AJAX::save_variations()’, “do_action(‘wp_ajax_woocommerce_save_variations’)”]
   type: “warning”
 * **Question:**
    - Can you please assist me in resolving this issue? Are there any known fixes
      or adjustments that need to be made in order to prevent this error from occurring?
 * Thank you in advance for your help!
 * Best regards

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

 *  Plugin Author [yakacj](https://wordpress.org/support/users/yakacj/)
 * (@yakacj)
 * [1 year, 3 months ago](https://wordpress.org/support/topic/undefined-array-key-2-error-in-class_ycve_admin-php/#post-18325606)
 * Hello [@bulls_shark](https://wordpress.org/support/users/bulls_shark/),
 * I’ve reviewed your message and tested the issue with my current setup: WordPress
   6.7.2 and WooCommerce 9.6.2.
 * Unfortunately, I couldn’t replicate the issue. To better assist you, could you
   please provide more details about your system’s current versions and the exactly
   on which action you’re getting this error or warning message? Your additional
   information will help me resolve the issue promptly.
 * Thanks for using our Plugin, waiting for more details, so I can correctly addressed
   the issue and resolve it asap.
 *  Thread Starter [bulls_shark](https://wordpress.org/support/users/bulls_shark/)
 * (@bulls_shark)
 * [1 year, 3 months ago](https://wordpress.org/support/topic/undefined-array-key-2-error-in-class_ycve_admin-php/#post-18325676)
 * Hello, thank you, we wrote about an extension with the date readout. You already
   have the data. Thanks for the support
 *  Plugin Author [yakacj](https://wordpress.org/support/users/yakacj/)
 * (@yakacj)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/undefined-array-key-2-error-in-class_ycve_admin-php/#post-18370282)
 * Hello [@bulls_shark](https://wordpress.org/support/users/bulls_shark/) ,
 * Issue has been resolved from v.1.0.11, let me know if you have any further query
   or issue.
 * Regards
 *  Thread Starter [bulls_shark](https://wordpress.org/support/users/bulls_shark/)
 * (@bulls_shark)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/undefined-array-key-2-error-in-class_ycve_admin-php/#post-18370325)
 * Thx 🙂

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

The topic ‘Undefined array key 2″ Error in class_ycve_admin.php’ is closed to new
replies.

 * ![](https://ps.w.org/variation-auto-expire-for-woocommerce/assets/icon-256x256.
   jpg?rev=2851770)
 * [Variation Auto Expire For WooCommerce](https://wordpress.org/plugins/variation-auto-expire-for-woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/variation-auto-expire-for-woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/variation-auto-expire-for-woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/variation-auto-expire-for-woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/variation-auto-expire-for-woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/variation-auto-expire-for-woocommerce/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [bulls_shark](https://wordpress.org/support/users/bulls_shark/)
 * Last activity: [1 year, 2 months ago](https://wordpress.org/support/topic/undefined-array-key-2-error-in-class_ycve_admin-php/#post-18370325)
 * Status: resolved