Title: Shortcode doesn&#039;t work
Last modified: September 1, 2016

---

# Shortcode doesn't work

 *  Resolved [sergc](https://wordpress.org/support/users/sergc/)
 * (@sergc)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/shortcode-doesnt-work-30/)
 * Running WP 4.5.3 with 1.1.2 of your plugin.
 * Automatic form doesn’t show up by default. So I disabled it in settings of your
   plugin and also tried using the shortcode.
 * `print do_shortcode('[instock]');`
 * Still nothing.
 * Dumping all active shortcodes out of WP I do see yours, but it literally outputs
   an empty string if I run the code snippet above.
 * PS, I am placing it in single-product/add-to-cart/variation-add-to-cart-button.
   php, which is on single product page.
 * [https://wordpress.org/plugins/instock-email-alert-for-woocommerce/](https://wordpress.org/plugins/instock-email-alert-for-woocommerce/)

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

 *  Plugin Author [Laszlo Kruchio](https://wordpress.org/support/users/lacee1986/)
 * (@lacee1986)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/shortcode-doesnt-work-30/#post-7585306)
 * Hi sergc,
 * Unfortunately, the plugin only works with variable products if you enable the
   stock management on product level.
 * I’ll add this to the new release in the future.
 * Thanks
 *  Thread Starter [sergc](https://wordpress.org/support/users/sergc/)
 * (@sergc)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/shortcode-doesnt-work-30/#post-7585327)
 * Actually I just disabled that option and the form shows up.
 * Follow up question, is there a reliable way for me to overwrite templates?
 *  Thread Starter [sergc](https://wordpress.org/support/users/sergc/)
 * (@sergc)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/shortcode-doesnt-work-30/#post-7585364)
 * I see what you mean now. Any guess when you’d be able to implement the update?
 *  Thread Starter [sergc](https://wordpress.org/support/users/sergc/)
 * (@sergc)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/shortcode-doesnt-work-30/#post-7585393)
 * For anyone interested, in plugin’s instock-email-alert.php file, changing line
   159 from
 * `if ( !$stock > 0 && !$product->is_in_stock() ) {`
 * to
 * `if ( /*!$stock > 0 &&*/ !$product->is_in_stock() ) {`
 * provided me with a more desirable behavior.
 *  Plugin Author [Laszlo Kruchio](https://wordpress.org/support/users/lacee1986/)
 * (@lacee1986)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/shortcode-doesnt-work-30/#post-7585398)
 * Hi sergc,
 * Thank you for the tip! I’ll take a look on the code.

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

The topic ‘Shortcode doesn't work’ is closed to new replies.

 * ![](https://ps.w.org/instock-email-alert-for-woocommerce/assets/icon-256x256.
   jpg?rev=1229992)
 * [Instock Email Alert for Woocommerce](https://wordpress.org/plugins/instock-email-alert-for-woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/instock-email-alert-for-woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/instock-email-alert-for-woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/instock-email-alert-for-woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/instock-email-alert-for-woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/instock-email-alert-for-woocommerce/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [Laszlo Kruchio](https://wordpress.org/support/users/lacee1986/)
 * Last activity: [9 years, 8 months ago](https://wordpress.org/support/topic/shortcode-doesnt-work-30/#post-7585398)
 * Status: resolved