Title: Undefined variable: version
Last modified: August 30, 2016

---

# Undefined variable: version

 *  Resolved [xedemx](https://wordpress.org/support/users/xedemx/)
 * (@xedemx)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/undefined-variable-version/)
 * Hi Richard,
 * Great plugin, thank you!
 * I have noticed this error when installing it to vegafuszeray.hu:
 * Notice: Undefined variable: version in /home/vegafuszeray/public_html/wp-content/
   plugins/cookie-law-info/php/functions.php on line 137
 * I’ve fixed it by adding $version = ‘1.5.3’; after the if block. (See below)
 * Sorry if this is a repost, I haven’t seen this error posted in the forum.
 * Cheers,
    Adam
 * function cookielawinfo_enqueue_frontend_scripts() {
    $the_options = cookielawinfo_get_admin_settings();
   if ( $the_options[‘is_on’] == true ) {
 *  /**
    * Force reload */ $version = ‘1.5.3’;
 *  wp_register_style( ‘cookielawinfo-style’, CLI_PLUGIN_URL . ‘css/cli-style.css’,
   null, $version );
    wp_enqueue_style( ‘cookielawinfo-style’ );
 *  wp_enqueue_script( ‘cookie-law-info-script’, CLI_PLUGIN_URL . ‘js/cookielawinfo.
   js’, array( ‘jquery’ ), $version );
    } **$version = ‘1.5.3’;** wp_register_style(‘
   cookielawinfo-table-style’, CLI_PLUGIN_URL . ‘css/cli-tables.css’, null, $version);}
 * [https://wordpress.org/plugins/cookie-law-info/](https://wordpress.org/plugins/cookie-law-info/)

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

 *  [Richard](https://wordpress.org/support/users/richardashby/)
 * (@richardashby)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/undefined-variable-version/#post-6664161)
 * Hi, thanks for spotting. The correct fix is very slightly different (rather than
   duplicate a variable declaration, just move it above the if statement) and I’ll
   push that in a minor release. Cheers!
 *  Thread Starter [xedemx](https://wordpress.org/support/users/xedemx/)
 * (@xedemx)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/undefined-variable-version/#post-6664191)
 * You’re right 🙂 thanks!

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

The topic ‘Undefined variable: version’ is closed to new replies.

 * ![](https://ps.w.org/cookie-law-info/assets/icon.svg?rev=3007243)
 * [CookieYes – Cookie Banner for Cookie Consent (Easy to setup GDPR/CCPA Compliant Cookie Notice)](https://wordpress.org/plugins/cookie-law-info/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/cookie-law-info/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/cookie-law-info/)
 * [Active Topics](https://wordpress.org/support/plugin/cookie-law-info/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/cookie-law-info/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/cookie-law-info/reviews/)

## Tags

 * [undefined variable](https://wordpress.org/support/topic-tag/undefined-variable/)

 * 2 replies
 * 2 participants
 * Last reply from: [xedemx](https://wordpress.org/support/users/xedemx/)
 * Last activity: [10 years, 7 months ago](https://wordpress.org/support/topic/undefined-variable-version/#post-6664191)
 * Status: resolved