• Resolved rebiscoco

    (@rebiscoco)


    Hi,

    I activated the plugin from 2.7 to 3.0

    Now I can’t activate it anymore:

    Parse error: syntax error, unexpected ‘[‘ in /home/content/52/9335952/html/sngdev/wp-content/plugins/dd-lastviewed/last-viewed.php on line 37

    add_action( ‘customize_preview_init’, [ $this, ‘my_preview_js’ ] );

    Error on that line.

    Is there something wrong? Should it be array( $this, ‘my_preview_js’) rather than solid brackets?

    You’re plugin is really great. Need to resolve this.

    Let me know.

    Thanks

    https://www.ads-software.com/plugins/dd-lastviewed/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Mosterd3d

    (@mosterd3d)

    Ola Rebiscoco,

    Thanks for using my plugin and that it fits your needs ??! And what a disaster you can’t run the latest version ( 3.0 is a nice update btw). Because you are the only one who mentioned it here, I’m afraid it’s something at your side.

    The plugin uses [] indeed instead of array(). Probably it’s because your running a PHP version < 5.4. If it is so, better to upgrade PHP instead of changing all brackets back to arrays. If you don’t probably you will get more of this errors in the future with other installs, plugins or themes which are using brackets as well.

    Hope this is the case (and you can solve it) to run (finally) 3.0 on you WP install. Please let me know, so we can mark this thread as resolved.

    Sincerely,

    Wouter

    Plugin Author Mosterd3d

    (@mosterd3d)

    Ola Rebiscoco,

    I reverted the array notation back to array(). More people complained about the compatibility with their php version. Maybe I was to quick ??

    So version 3.0.1 should work for you!

    Thread Starter rebiscoco

    (@rebiscoco)

    Ola Mosterd3d,

    Thanks a lot! Great plugin! ??

    Plugin Author Mosterd3d

    (@mosterd3d)

    Ola Rebiscoco,

    You can thank show by leaving a review! ?? It makes me happy as well.

    Enjoy the plugin, I will close this thread as resolved.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Cannot activate. Syntax Error after updating to v3.0’ is closed to new replies.