Title: PHP errors &#8211; PHP Warning: Undefined array key
Last modified: November 3, 2025

---

# PHP errors – PHP Warning: Undefined array key

 *  [vilu8](https://wordpress.org/support/users/vilu8/)
 * (@vilu8)
 * [6 months, 4 weeks ago](https://wordpress.org/support/topic/php-errors-php-warning-undefined-array-key/)
 * Hi! We have lot of this kind of erros in error log.
 * Do you know what is causing these?
 * [19-Oct-2025 03:09:05 UTC] PHP Warning: Undefined array key 2 in /data/wordpress/
   htdocs/wp-content/plugins/yith-woocommerce-gift-cards/includes/class-yith-wc-
   product-gift-card.php on line 371 [19-Oct-2025 03:09:05 UTC] PHP Warning: Undefined
   array key 4 in /data/wordpress/htdocs/wp-content/plugins/yith-woocommerce-gift-
   cards/includes/class-yith-wc-product-gift-card.php on line 371 [19-Oct-2025 03:
   16:27 UTC] PHP Warning: Undefined array key 2 in /data/wordpress/htdocs/wp-content/
   plugins/yith-woocommerce-gift-cards/includes/class-yith-wc-product-gift-card.
   php on line 371

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

 *  [Juan Coronel](https://wordpress.org/support/users/juaancmendez/)
 * (@juaancmendez)
 * [6 months, 4 weeks ago](https://wordpress.org/support/topic/php-errors-php-warning-undefined-array-key/#post-18705183)
 * Hi there,
   thanks for contacting us!
 * Could you confirm if you’re using the latest versions of WordPress, WooCommerce,
   and our plugin? What version of PHP are you using?
 * Please let me know.
 * Best regards.
 *  Thread Starter [vilu8](https://wordpress.org/support/users/vilu8/)
 * (@vilu8)
 * [6 months, 3 weeks ago](https://wordpress.org/support/topic/php-errors-php-warning-undefined-array-key/#post-18711072)
 * Yes! I am.
 * Php version is 8.3
    -  This reply was modified 6 months, 3 weeks ago by [vilu8](https://wordpress.org/support/users/vilu8/).
 *  [Juan Coronel](https://wordpress.org/support/users/juaancmendez/)
 * (@juaancmendez)
 * [6 months, 2 weeks ago](https://wordpress.org/support/topic/php-errors-php-warning-undefined-array-key/#post-18715280)
 * Hello there,
 * Could you check by downgrading to PHP 8.2?
 * Let us know.
 * Best regards.
 *  Thread Starter [vilu8](https://wordpress.org/support/users/vilu8/)
 * (@vilu8)
 * [6 months, 2 weeks ago](https://wordpress.org/support/topic/php-errors-php-warning-undefined-array-key/#post-18716075)
 * Hi!
 * It was 8.2. couple of days ago. Did not change anything.
 *  [Juan Coronel](https://wordpress.org/support/users/juaancmendez/)
 * (@juaancmendez)
 * [6 months, 2 weeks ago](https://wordpress.org/support/topic/php-errors-php-warning-undefined-array-key/#post-18719620)
 * Hi there,
 * I’m sorry, but the line of code where you’re getting the error doesn’t match 
   an array output. Could you confirm if your version is 4.29.0?
 * Currently, the line is this:
 *     ```wp-block-code
       $price_format    = get_woocommerce_price_format();
       ```
   
 * Let us know.
 * Best regards.
 *  Thread Starter [vilu8](https://wordpress.org/support/users/vilu8/)
 * (@vilu8)
 * [6 months, 1 week ago](https://wordpress.org/support/topic/php-errors-php-warning-undefined-array-key/#post-18725644)
 * Yes, the version is: Version 4.29.0 YITH

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

The topic ‘PHP errors – PHP Warning: Undefined array key’ is closed to new replies.

 * ![](https://ps.w.org/yith-woocommerce-gift-cards/assets/icon-256x256.gif?rev=
   3227932)
 * [YITH WooCommerce Gift Cards](https://wordpress.org/plugins/yith-woocommerce-gift-cards/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/yith-woocommerce-gift-cards/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/yith-woocommerce-gift-cards/)
 * [Active Topics](https://wordpress.org/support/plugin/yith-woocommerce-gift-cards/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/yith-woocommerce-gift-cards/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/yith-woocommerce-gift-cards/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [vilu8](https://wordpress.org/support/users/vilu8/)
 * Last activity: [6 months, 1 week ago](https://wordpress.org/support/topic/php-errors-php-warning-undefined-array-key/#post-18725644)
 * Status: not resolved