Title: wp_register_script error
Last modified: June 21, 2019

---

# wp_register_script error

 *  [joevansteen](https://wordpress.org/support/users/joevansteen/)
 * (@joevansteen)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/wp_register_script-error/)
 * I suggest the following adjustment to the inc/initLight.inc.php module
 *  if($GLOBALS[“canvasioId”]==0){
    add_action( ‘wp_enqueue_scripts’, ‘caCustom_scripts’);}/********************
   jvs – modified this module to correct error message:
 *  Notice: wp_register_script was called incorrectly. Scripts and styles should
   not be registered or enqueued until the wp_enqueue_scripts,
    admin_enqueue_scripts,
   or login_enqueue_scripts hooks. Please see Debugging in WordPress for more information.(
   This message was added in version 3.3.0.) in /www/wepacuxe_957/public/wp-includes/
   functions.php on line 4773 *********************************/
 *  function caCustom_scripts ( ) {
    wp_register_script(‘threejs’,plugins_url(‘/
   inc/js/three.min.js’,dirname(__FILE__),false)); wp_register_script(‘glDetector’,
   plugins_url(‘/inc/js/Detector.js’,dirname(__FILE__),false)); wp_register_script(‘
   wpWebGL’,plugins_url(‘/inc/js/wpWebGL.js’,dirname(__FILE__),false)); }
 * This should replace the direct use of wp_register_script at time of init with
   registration at a more appropriate point in the execution stream.

The topic ‘wp_register_script error’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/canvasio3d-light_ebebeb.svg)
 * [canvasio3D Light](https://wordpress.org/plugins/canvasio3d-light/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/canvasio3d-light/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/canvasio3d-light/)
 * [Active Topics](https://wordpress.org/support/plugin/canvasio3d-light/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/canvasio3d-light/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/canvasio3d-light/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [joevansteen](https://wordpress.org/support/users/joevansteen/)
 * Last activity: [6 years, 11 months ago](https://wordpress.org/support/topic/wp_register_script-error/)
 * Status: not resolved