Problem with wp_enqueue_scripts in plugin
Because calc_script is inside your class, it’s not publicly available like a regular function. So, change your enqueue call to this: add_action( ‘wp_enqueue_scripts’, array( $this , ‘calc_script’ ) ); And make calc_script() public. Edit: Your add_action() is in the class as well, it needs to be in another function, preferably one hooked to the init … Read more