Title: Error / warning when activated through API / CLI
Last modified: November 9, 2022

---

# Error / warning when activated through API / CLI

 *  Resolved [Charalampos Papazoglou](https://wordpress.org/support/users/cpapazoglou/)
 * (@cpapazoglou)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/error-warning-when-activated-through-api-cli/)
 * When installing / activating the plugin in WordPress.com ([https://wordpress.com/plugins/wp-dummy-content-generator](https://wordpress.com/plugins/wp-dummy-content-generator)),
   there is an error returned to the user. This is due to a redirection happening
   on `plugin_activated` in [https://plugins.trac.wordpress.org/browser/wp-dummy-content-generator/trunk/wp_dummy_content_generator.php#L80](https://plugins.trac.wordpress.org/browser/wp-dummy-content-generator/trunk/wp_dummy_content_generator.php#L80).
 * When in API ( wp-json, xmlrpc etc) or WP CLI context, the redirection would return
   an error or warning instead of success message.

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

 *  Thread Starter [Charalampos Papazoglou](https://wordpress.org/support/users/cpapazoglou/)
 * (@cpapazoglou)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/error-warning-when-activated-through-api-cli/#post-16183342)
 * You can check a similar workaround [https://github.com/Automattic/zero-bs-crm/blob/trunk/includes/ZeroBSCRM.Core.php#L2181](https://github.com/Automattic/zero-bs-crm/blob/trunk/includes/ZeroBSCRM.Core.php#L2181)
 *  Plugin Author [Deepak anand](https://wordpress.org/support/users/deepakanand767/)
 * (@deepakanand767)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/error-warning-when-activated-through-api-cli/#post-16197129)
 * Hi [@cpapazoglou](https://wordpress.org/support/users/cpapazoglou/)
 * Thanks for reporting the issue. I have fixed the issue in this version(2.1.2)
   of the plugin.
 * Cheers!!!
 *  Thread Starter [Charalampos Papazoglou](https://wordpress.org/support/users/cpapazoglou/)
 * (@cpapazoglou)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/error-warning-when-activated-through-api-cli/#post-16199139)
 * Thanks!

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

The topic ‘Error / warning when activated through API / CLI’ is closed to new replies.

 * ![](https://ps.w.org/wp-dummy-content-generator/assets/icon.svg?rev=3022566)
 * [WP Dummy Content Generator](https://wordpress.org/plugins/wp-dummy-content-generator/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-dummy-content-generator/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-dummy-content-generator/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-dummy-content-generator/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-dummy-content-generator/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-dummy-content-generator/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Charalampos Papazoglou](https://wordpress.org/support/users/cpapazoglou/)
 * Last activity: [3 years, 7 months ago](https://wordpress.org/support/topic/error-warning-when-activated-through-api-cli/#post-16199139)
 * Status: resolved