Title: Undefined variable: flag
Last modified: August 17, 2017

---

# Undefined variable: flag

 *  Resolved [Timvg](https://wordpress.org/support/users/timvangorp/)
 * (@timvangorp)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/undefined-variable-flag/)
 * Hi there
 * Because I’m still running Woocommerce 2.6, I’ve installed your v1.3.2 since the
   rest is only compatible with Woocommere 3
 * On product pages where everything is in stock the following message shows:
 * > Notice: Undefined variable: flag in C:\xampp\htdocs\goodclone\wp-content\plugins\
   > woocommerce-product-stock-alert\classes\class-woo-product-stock-alert-frontend.
   > php on line 200
 * Could you please share the fix for this?
    Thank you so much!
 * Have a nice day,
    Tim

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

 *  Thread Starter [Timvg](https://wordpress.org/support/users/timvangorp/)
 * (@timvangorp)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/undefined-variable-flag/#post-9419378)
 * If you could also provide the fix for not showing the ‘stock alert email’ by 
   default on visiting the page when one of the options is out of stock, us Woocommerce
   2.6 people can still use your wonderful plugin. 🙂 (Or maybe even upgrade v1.3.2
   with the fixes by default?)
 * To elaborate:
    If I have a product with size S, M, L ; and M would be out of 
   stock, the plugin already shows the stock alert on visiting the page. I assume
   you fixed this in later versions so that the message only shows when the out 
   of stock size is selected. Could you please share the code(s) to fix it in v1.3.2?
 * It seems others would love to still have it compatible with Woo2.6 as well, they
   could all refer to this topic as the fix to do so. 😉
    -  This reply was modified 8 years, 7 months ago by [Timvg](https://wordpress.org/support/users/timvangorp/).
 *  [DualCube](https://wordpress.org/support/users/dualcube/)
 * (@dualcube)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/undefined-variable-flag/#post-9429800)
 * [@timvangorp](https://wordpress.org/support/users/timvangorp/) Thanks for getting
   in touch with us.
 * I am afraid it will be difficult to provide the support older version, as WooCommerce
   3.0+ was a major release and has important changes.
 * You can look into the changes codes in our updated plugin and while changing 
   codes please make sure to replace the frontend.js
 *  Thread Starter [Timvg](https://wordpress.org/support/users/timvangorp/)
 * (@timvangorp)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/undefined-variable-flag/#post-9432421)
 * [@dualcube](https://wordpress.org/support/users/dualcube/) thank you for your
   reply.
 * I’m just a beginner so I’m not capable of reverse engineering your code, but 
   I understand that it’s probably too much effort to upgrade an older version with
   the fix mentioned above.
 * Could you add an option for placeholder text in a future update though? The email
   field is still blank with no option to add a placeholder if I’m not mistaken.
 * Have a nice day.
 *  [DualCube](https://wordpress.org/support/users/dualcube/)
 * (@dualcube)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/undefined-variable-flag/#post-9447533)
 * [@timvangorp](https://wordpress.org/support/users/timvangorp/) I have forwarded
   this feature request to the team.
 * They will take the further decide whether to add that in our next update.

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

The topic ‘Undefined variable: flag’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce-product-stock-alert/assets/icon-256x256.gif?
   rev=3323952)
 * [Notifima – WooCommerce Stock Manager, Inventory Management, Waitlist](https://wordpress.org/plugins/woocommerce-product-stock-alert/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce-product-stock-alert/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce-product-stock-alert/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce-product-stock-alert/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce-product-stock-alert/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce-product-stock-alert/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [DualCube](https://wordpress.org/support/users/dualcube/)
 * Last activity: [8 years, 7 months ago](https://wordpress.org/support/topic/undefined-variable-flag/#post-9447533)
 * Status: resolved