• Your front-end script is expecting jQuery to be found as jQuery() object on the front end. Though you are not listing it as a dependecy while enqueuing the front end scripts.

    So I found out that if I am not logged in; the redirection doesn’t work because jQuery wasn’t loaded on the front end.

    I solved it by enqueuing it in my functions.php with high priority, but if you are planning updates you can just add it as one of the dependencies while enqueing the front end scripts:

    public function enqueue_frontend() {
    	wp_enqueue_script(
    		'wpcf7-redirect-script',
    		$this->plugin_url . 'js/wpcf7-redirect-script.js',
    		array('jquery'),
    		null,
    		true
    	);

    Thanks for your work. Really nice plugin, simple, working. Just what I was looking for ??

    The page I need help with: [log in to see the link]

  • The topic ‘List jQuery as dependency’ is closed to new replies.