Title: Undefined variable PHP Error in Plugin
Last modified: August 20, 2016

---

# Undefined variable PHP Error in Plugin

 *  Resolved [aliput](https://wordpress.org/support/users/aliput/)
 * (@aliput)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/undefined-variable-php-error-in-plugin/)
 * Notice: Undefined variable: cards in ds-sagepay-direct.php
 * `Undeclared variable cards on line 163.`
    You’ve declared `cards` inside `isAdmin`.
   I’ve corrected this on my site by declaring `cards` before `isAdmin`. Just a 
   heads up.
 * [http://wordpress.org/extend/plugins/sagepay-direct-for-woocommerce-payment-gateway/](http://wordpress.org/extend/plugins/sagepay-direct-for-woocommerce-payment-gateway/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [swicks](https://wordpress.org/support/users/swicks/)
 * (@swicks)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/undefined-variable-php-error-in-plugin/#post-3623025)
 * thanks for the heads up – I’ve removed active_cards variable as it’s was planned
   for a later release.
 * pushed a new update out…
 * Steve

Viewing 1 replies (of 1 total)

The topic ‘Undefined variable PHP Error in Plugin’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/sagepay-direct-for-woocommerce-payment-
   gateway_8284e5.svg)
 * [WooCommerce SagePay Direct Payment Gateway](https://wordpress.org/plugins/sagepay-direct-for-woocommerce-payment-gateway/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/sagepay-direct-for-woocommerce-payment-gateway/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/sagepay-direct-for-woocommerce-payment-gateway/)
 * [Active Topics](https://wordpress.org/support/plugin/sagepay-direct-for-woocommerce-payment-gateway/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/sagepay-direct-for-woocommerce-payment-gateway/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/sagepay-direct-for-woocommerce-payment-gateway/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [swicks](https://wordpress.org/support/users/swicks/)
 * Last activity: [13 years, 1 month ago](https://wordpress.org/support/topic/undefined-variable-php-error-in-plugin/#post-3623025)
 * Status: resolved