Enqueue scripts and styles error
-
You should really consider developing your plugin with “debug” on.
I got these errors on my site:Notice: wp_enqueue_style was called incorrectly
Notice: wp_enqueue_script was called incorrectly
Easy fix, which I don’t really think I should have to do…
Openclass-easy-payment-admin.php
and replace the following in the construct function:$this->enqueue_styles();
$this->enqueue_scripts();
With:
add_action('admin_enqueue_scripts', array( $this, 'enqueue_styles' ));
add_action('admin_enqueue_scripts', array( $this, 'enqueue_scripts' ));
Not sure if those should only be registered for wp-admin, but I don’t want them on the front end so for me it is enough.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Enqueue scripts and styles error’ is closed to new replies.