Title: &#8216;wpcf7_add_shortcode&#8217; error
Last modified: April 16, 2018

---

# ‘wpcf7_add_shortcode’ error

 *  [woomad](https://wordpress.org/support/users/woomad/)
 * (@woomad)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/wpcf7_add_shortcode-error/)
 * I think you still got this code which is deprecated now in your plugin and even
   though I am not using yours with contact 7 and use their own capcha as you recommended
   it is still throwing an error.
 * PHP Notice: wpcf7_add_shortcode is **deprecated** since Contact Form 7 version
   4.6! Use wpcf7_add_form_tag instead. in /home/site/public_html/wp-content/plugins/
   contact-form-7/includes/functions.php on line 365

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

 *  [RocketSMS](https://wordpress.org/support/users/rocketsms/)
 * (@rocketsms)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/wpcf7_add_shortcode-error/#post-10199710)
 * I am getting this same error too! If I disable your plug-in, the message goes
   away. I too am not using this for ReCaptcha on CF7 since it has its own built-
   in ReCaptcha now.
    -  This reply was modified 8 years, 1 month ago by [RocketSMS](https://wordpress.org/support/users/rocketsms/).
    -  This reply was modified 8 years, 1 month ago by [RocketSMS](https://wordpress.org/support/users/rocketsms/).
 *  [RocketSMS](https://wordpress.org/support/users/rocketsms/)
 * (@rocketsms)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/wpcf7_add_shortcode-error/#post-10199919)
 * So I was able to fix it. In anr-captcha-class.php I changed:
 *     ```
       			if ( function_exists( 'wpcf7_add_shortcode' )) {
       					wpcf7_add_shortcode('anr_nocaptcha', array($this, 'wpcf7_form_field'), true);
       					add_filter('wpcf7_validate_anr_nocaptcha', array($this, 'wpcf7_verify'), 10, 2);
       				}
       ```
   
 * To this:
 *     ```
       			if ( function_exists( 'wpcf7_add_form_tag' )) {
       					wpcf7_add_form_tag('anr_nocaptcha', array($this, 'wpcf7_form_field'), true);
       					add_filter('wpcf7_validate_anr_nocaptcha', array($this, 'wpcf7_verify'), 10, 2);
       				}
       ```
   
 *  Thread Starter [woomad](https://wordpress.org/support/users/woomad/)
 * (@woomad)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/wpcf7_add_shortcode-error/#post-10200439)
 * I did the same thing to the code. However, what puzzles me is that according 
   to the author this plugin doesn’t support contact form 7 anymore, so what is 
   the need for this piece of code in the plugin?
 *  [Shamim Hasan](https://wordpress.org/support/users/shamim51/)
 * (@shamim51)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/wpcf7_add_shortcode-error/#post-10200770)
 * As CF7 now has its own recaptcha plugin, this plugin does not support CF7 anymore.
   
   In this plugin, still have CF7 deprecated code, so that users can get time to
   setup CF7 build in captcha. Deprecated notice will only show if your debug is
   active. So in live site this deprecated notice will not show. Also this plugin
   will not do anything for CF7 if you do not use its shortcode for CF7.
 * This deprecated code will be removed in next major version of this plugin.

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

The topic ‘‘wpcf7_add_shortcode’ error’ is closed to new replies.

 * ![](https://ps.w.org/advanced-nocaptcha-recaptcha/assets/icon-256x256.png?rev
   =2961544)
 * [CAPTCHA 4WP - Antispam CAPTCHA solution for WordPress](https://wordpress.org/plugins/advanced-nocaptcha-recaptcha/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/advanced-nocaptcha-recaptcha/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/advanced-nocaptcha-recaptcha/)
 * [Active Topics](https://wordpress.org/support/plugin/advanced-nocaptcha-recaptcha/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/advanced-nocaptcha-recaptcha/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/advanced-nocaptcha-recaptcha/reviews/)

 * 4 replies
 * 3 participants
 * Last reply from: [Shamim Hasan](https://wordpress.org/support/users/shamim51/)
 * Last activity: [8 years, 1 month ago](https://wordpress.org/support/topic/wpcf7_add_shortcode-error/#post-10200770)
 * Status: not resolved