Questions tagged [admin-ajax]

62 questions
1
vote
1 answer

Wordpress ajax-admin.php waiting time too long

My wordpress admin dashboard is loading slowly and taking too much time to load. The wordpress homepage loading time is okay. But when I logged in, and move to admin dashboard, all activities loaded slowly (up to 35s). I have view network console,…
1
vote
0 answers

Ajax filter on custom post type

I created an ajax filter on custom post type filter is working fine when I select 10-12 filters but after that admin-ajax.php file gone to pending, I don't know what is the issue. Website url :…
1
vote
0 answers

jQuery Ajax (Wordpress) not passing all of my POST variables

I am creating a small web application using WordPress. I'm using Ajax to make multiple calls for a reservation system. I have 4 steps (Get Industry's, Get Consultants in Industry, Get available times of that consultant, and then make reservation. It…
1
vote
2 answers

get referrer URL in wp-admin-ajax.php

I used some X hook in function.php. I need to know which page trigger this action, need to get referrer URL and redirect to that page with success meassage. function bp_plugin_hook_activity_posted_update( $content, $user_id, $activity_id, $event_id…
1
vote
2 answers

Can't use WC_Order in admin-ajax.php

I'm trying to retrieve order information within the admin-ajax.php request, but it is returning protected objects with no data. Is there a way to access this? I'm using this: $data = new WC_Order($order_id); var_dump($data); This works when it is…
Liam McArthur
  • 1,033
  • 3
  • 18
  • 42
1
vote
1 answer

Navigating to blank PHP file returning 0 in browser

I'm running a WordPress install and was having issues with ajax-loads. Whenever I used the admin-ajax.php script, it wasn't returning anything so I decided to go to the source and see what the issue is. It turns out that when I access the…
PavKR
  • 1,591
  • 2
  • 11
  • 26
1
vote
0 answers

Called and canceled of the admin-ajax.php file multiple times

I have an issue in a Wordpress installation with a plugin. There is a calendar which you can click on a day (or a range of days) and from ajax calls through admin-ajax.php it calculates product costs. The problem is that, when I click on a calendar…
Tasos
  • 7,325
  • 18
  • 83
  • 176
1
vote
2 answers

wordpress ajax keeps losing connections

I apologize for my being little more han a newbie in WP and ajax but I need your help. I'm not sure if it's a bug or it's simply me who cannot manage to find a solution. I've the following situation. I've a plugin that displays certain data from a…
user4096537
1
vote
1 answer

Ajax call in wordpress not working for subscriber user in front site

i have simple wordpress form to add data in custom table in wordpress using Ajax my jquery code(Ajax code ) jQuery.ajax(ajax_object.ajax_url, { type: "POST", data: data, …
Ankur Bhadania
  • 4,123
  • 1
  • 23
  • 38
0
votes
0 answers

admin ajax request giving 400 error when accessing function inside php class

I am using admin ajax request in wordpress plugin to access a function inside php class. But, it is giving 400 bad request error: my class file name: class.ajaxtest.php ajaxtest_PLUGIN_URL is defined in main plugin php file as…
Rahul B
  • 71
  • 6
0
votes
1 answer

Wordpress plugin jQuery script call to admin-ajax.php works only once

I'm writing a little wordpress plugin. The plugin has a simple script that interacts with a datatable in the backend. It is used to duplicate a row in the table by clicking a button, and then insert the data in the database. I'm using a…
uomopalese
  • 471
  • 1
  • 5
  • 21
0
votes
0 answers

Woocommerce ajax return empty shipping packages

Am trying to get the shipping packages with ajax but its always returning empty value. same issue while trying to call get the zones with: WC_Shipping_Zones::get_zones(); am using the same code in woocommerce_checkout_before_order_review and its…
0
votes
1 answer

Wordpress Ajax returning full html of same page

Am trying to run Ajax call in my Woocommerce checkout page, but am always getting the full html of same page return. add_action( 'wp_enqueue_scripts', 'theme_scripts' ); function theme_scripts() { wp_enqueue_script( 'theme_scripts',…
0
votes
1 answer

Oxygen Builder: Making Ajax Calls from Code Block

Yeah, so this is super frustrating. It should be a simple answer for someone... I am trying to simply figure out how to make a call to admin-ajax.php from a Code Block within Oxygen and I can't figure out how this is supposed to be working. I'm…
dcolumbus
  • 9,596
  • 26
  • 100
  • 165
0
votes
0 answers

Wordperss admin-ajax.php error 400 Bad Request

I can't find where this error 400 comes from? FontOffice only avaible for logged in persons. I'm trying to create a form to post a custom post type through Ajax. Here is the form in front office:
C_Com2see
  • 33
  • 5