Title: Plugin Using Deprecated WooCommerce Code — Immidiate Fix needed
Last modified: June 17, 2026

---

# Plugin Using Deprecated WooCommerce Code — Immidiate Fix needed

 *  Resolved [iSaumya](https://wordpress.org/support/users/isaumya/)
 * (@isaumya)
 * [2 weeks, 6 days ago](https://wordpress.org/support/topic/plugin-using-deprecated-woocommerce-code-immidiate-fix-needed/)
 * Hi [@codemenschen](https://wordpress.org/support/users/codemenschen/),
 * Inside `plugins/gift-voucher/gift-voucher.php` you have `wpgv_handle_gift_voucher_application`
   function that is currently accessing the coupon codes in 2 places:
    1. `$gift_voucher = new WPGV_Gift_Voucher($coupon->code);`
    2. `$session_data['gift_voucher'][$coupon->code] = 0;`
 * Accessing the coupon code with `$coupon->code` has long been deprecated. Please
   change this to `$coupon->get_code()` in the next update.
    -  This topic was modified 2 weeks, 6 days ago by [iSaumya](https://wordpress.org/support/users/isaumya/).
      Reason: fixed a typo in the heading

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

 *  Plugin Author [Codemenschen](https://wordpress.org/support/users/codemenschen/)
 * (@codemenschen)
 * [2 weeks, 6 days ago](https://wordpress.org/support/topic/plugin-using-deprecated-woocommerce-code-immidiate-fix-needed/#post-18941634)
 * Hi [@isaumya](https://wordpress.org/support/users/isaumya/),
 * Thanks for reporting this. You’re right — the plugin was using the deprecated`
   $coupon->code` property in `wpgv_handle_gift_voucher_application()`.
 * We’ve updated the code to use `$coupon->get_code()` instead, with a compatibility
   fallback for older WooCommerce environments. This will be included in the next
   release.
 * Appreciate you flagging it.
 *  Thread Starter [iSaumya](https://wordpress.org/support/users/isaumya/)
 * (@isaumya)
 * [2 weeks, 6 days ago](https://wordpress.org/support/topic/plugin-using-deprecated-woocommerce-code-immidiate-fix-needed/#post-18942096)
 * Glad to hear that this issue had been fixed in your codebase and will be part
   of the next release.
 * Marking this thread as resolved now.

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

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fplugin-using-deprecated-woocommerce-code-immidiate-fix-needed%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://ps.w.org/gift-voucher/assets/icon-256x256.png?rev=2433083)
 * [Gift Cards (Gift Vouchers and Packages) (WooCommerce Supported)](https://wordpress.org/plugins/gift-voucher/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/gift-voucher/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/gift-voucher/)
 * [Active Topics](https://wordpress.org/support/plugin/gift-voucher/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/gift-voucher/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/gift-voucher/reviews/)

## Tags

 * [deprecation](https://wordpress.org/support/topic-tag/deprecation/)
 * [warning](https://wordpress.org/support/topic-tag/warning/)

 * 2 replies
 * 2 participants
 * Last reply from: [iSaumya](https://wordpress.org/support/users/isaumya/)
 * Last activity: [2 weeks, 6 days ago](https://wordpress.org/support/topic/plugin-using-deprecated-woocommerce-code-immidiate-fix-needed/#post-18942096)
 * Status: resolved