Title: Shortcode called incorrect
Last modified: August 22, 2016

---

# Shortcode called incorrect

 *  Resolved [Austin](https://wordpress.org/support/users/austyfrosty/)
 * (@austyfrosty)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/shortcode-called-incorrect/)
 * `add_shortcode` should really be called in the `init` function and inside your`
   init` or at least `__constructor` methods.
 * Calling the the shortcode with staticly generates an error since it’s not a static
   method.
 * I would suggest moving it into the plugin class or at least calling the object
   you created just before the add_shortcode function $EDD_Software_Specs like so:
   `
   add_shortcode( 'edd-software-specs', array( $EDD_Software_Specs, 'edd_software_specs_shortcode'));`
 * [https://wordpress.org/plugins/easy-digital-downloads-software-specs/](https://wordpress.org/plugins/easy-digital-downloads-software-specs/)

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

 *  Plugin Author [isabel104](https://wordpress.org/support/users/isabel104/)
 * (@isabel104)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/shortcode-called-incorrect/#post-5554364)
 * Sorry for the delay. Thanks for pointing out the error. I’ll fix this sometime
   within the next few days. I have to change the line to:
 * `add_shortcode( 'edd-software-specs', array( EDD_Software_Specs::get_instance(),'
   edd_software_specs_shortcode' ) );`
 * Note:
    I leave “add_shortcode” outside the class because of the example in the
   [WordPress codex](http://codex.wordpress.org/Function_Reference/add_shortcode).
 *  Thread Starter [Austin](https://wordpress.org/support/users/austyfrosty/)
 * (@austyfrosty)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/shortcode-called-incorrect/#post-5554375)
 * Your object `$EDD_Software_Specs` is your class with instance since you called
   it before as `$EDD_Software_Specs = EDD_Software_Specs::get_instance()`. So it’s
   the same thing. 🙂
 *  Plugin Author [isabel104](https://wordpress.org/support/users/isabel104/)
 * (@isabel104)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/shortcode-called-incorrect/#post-5554380)
 * Thanks again. Version 1.7.1 (just released) fixes this. I hope this helps.

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

The topic ‘Shortcode called incorrect’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/easy-digital-downloads-software-specs_ffffff.
   svg)
 * [Easy Digital Downloads - Specs](https://wordpress.org/plugins/easy-digital-downloads-software-specs/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/easy-digital-downloads-software-specs/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/easy-digital-downloads-software-specs/)
 * [Active Topics](https://wordpress.org/support/plugin/easy-digital-downloads-software-specs/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/easy-digital-downloads-software-specs/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/easy-digital-downloads-software-specs/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [isabel104](https://wordpress.org/support/users/isabel104/)
 * Last activity: [11 years, 6 months ago](https://wordpress.org/support/topic/shortcode-called-incorrect/#post-5554380)
 * Status: resolved