Plugin (wpas) causing admin-ajax.php error
-
Hi guys this is the code from this plugin init.php file, basically adds script to the head of the wordpress.
function wpas_scripts() { wp_enqueue_script( 'wpas-scripts', get_wpas_uri() . '/js/scripts.js', array('jquery'), '1', false ); wp_enqueue_script( 'wpas-admin-ajax', admin_url( 'admin-ajax.php' ), array(), '1', false ); wp_localize_script( 'wpas-admin-ajax', 'WPAS_Ajax', array( 'ajaxurl' => admin_url( 'admin-ajax.php' ) ) ); } add_action('wp_enqueue_scripts', 'wpas_scripts');
so it causing this error in the console:
wp-admin/admin-ajax.php?ver=1 400 (Bad Request)
failing to load resource
or this:
wp-admin/admin-ajax.php?ver=1 net::ERR_ABORTEDSo basically i guess somehow it blocks the access to this file and throws an error.
Is there any way to fix this, like exception in functions.php or something?I have to invoke this script in the plugin, otherwise it is not working,
The page I need help with: [log in to see the link]
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘Plugin (wpas) causing admin-ajax.php error’ is closed to new replies.