The JS-scripts of the plugin violate the use of plugin hooks
-
Hey!
I tried to use wpcf7_mail_sent, wpcf7_submit, wpcf7_before_send_mail hooks, but each time an error message came out in the console:
Object { code: "invalid_json", message: "The response is not a valid JSON response." }
At the same time, sending the form freezes on a spinning spinner.
The problem has been observed for several months, users have found a solution in changing the TRUE to the FALSE in the definition of WPCF7_load_JS:
instead
if ( ! defined( 'WPCF7_LOAD_JS' ) ) { define( 'WPCF7_LOAD_JS', true ); }
need
if ( ! defined( 'WPCF7_LOAD_JS' ) ) { define( 'WPCF7_LOAD_JS', false ); }
Only if don’t load your plugin scripts, the hooks of your plugin begin to work. Obviously, the plugin code has an error or conflict.
I can confirm that the problem is not related to other plugins or themes. I tested on a site where only your plugin was activated. The audit was carried out, including with the latest standard themes (Twenty Twenty-One, Twenty Twenty-Two etc.).
I hope that you will quickly find the problem and eliminate it, and users will be able to continue to use all the possibilities of your excellent and popular plugin.
Sincerely,
Farid Taziev.
- The topic ‘The JS-scripts of the plugin violate the use of plugin hooks’ is closed to new replies.