Title: &#8220;Undefined array key&#8221; When using PHP 8.x
Last modified: February 11, 2023

---

# “Undefined array key” When using PHP 8.x

 *  Resolved [grannygrudge](https://wordpress.org/support/users/grannygrudge/)
 * (@grannygrudge)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/undefined-array-key-when-using-php-8-x/)
 * Thank you for this brilliant plugin.
 * When a user clicks into “My Account” ([https://URL/my-account/](https://URL/my-account/)),
   they are presented with the following error:
 *     ```wp-block-code
       Warning: Undefined array key "customer-logout" in /.../wp-content/plugins/wt-smart-coupons-for-woocommerce/public/class-myaccount-smart-coupon.php on line 61
       ```
   
 * This issue occurs when using PHP 8.2, 8.1, and 8.0. It does not occur when using
   PHP 7.4.
 * Versions in use:
    - Smart Coupons For WooCommerce Coupons v1.4.4
    - WooCommerce v7.3.0
    - WordPress v6.1.1
 * Any thoughts?

Viewing 1 replies (of 1 total)

 *  Plugin Support [WebToffee Support](https://wordpress.org/support/users/webtoffeesupport/)
 * (@webtoffeesupport)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/undefined-array-key-when-using-php-8-x/#post-16468932)
 * Hi [@grannygrudge](https://wordpress.org/support/users/grannygrudge/),
 * Thanks for reaching out to us.
 * We have identified the issue and fixed it in the latest beta versions of the 
   plugin. After completing necessary tests, we will implement it in the upcoming
   release of the plugin.

Viewing 1 replies (of 1 total)

The topic ‘“Undefined array key” When using PHP 8.x’ is closed to new replies.

 * ![](https://ps.w.org/wt-smart-coupons-for-woocommerce/assets/icon-128x128.gif?
   rev=3248429)
 * [Smart Coupons For WooCommerce Coupons](https://wordpress.org/plugins/wt-smart-coupons-for-woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wt-smart-coupons-for-woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wt-smart-coupons-for-woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/wt-smart-coupons-for-woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wt-smart-coupons-for-woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wt-smart-coupons-for-woocommerce/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [WebToffee Support](https://wordpress.org/support/users/webtoffeesupport/)
 * Last activity: [3 years, 3 months ago](https://wordpress.org/support/topic/undefined-array-key-when-using-php-8-x/#post-16468932)
 * Status: resolved