You can’t hook an AJAX action from within a shortcode, and the constructor for Wp_Lbs_Calendar
is only running inside your shortcode.
This means that the actions are only hooked to wp_ajax_
when your shortcode is used on the page. But the AJAX request is a separate request to admin-ajax.php
, and your shortcode is not running on on that page, so the actions are not hooked and will not run.
Your add_action()
s for AJAX need to be hooked in a place that lets them run on every page load, so that the handler is available on admin-ajax.php.
Related Posts:
- How to do admin ajax request in a plugin for rest api
- wp_ajax add_action fuction won’t fire on custom jQuery action
- Ajax: Populate with content from a post’s ID not working – duplicating current page html instead
- Data not insert and update through ajax and jQuery in admin page?
- Setting a JSON web token from a secondary api as a secure cookie on WordPress
- WP ajax requests not stacking?
- How do I get rid of my inclusion race-condition on wp_enqueue_script
- Issues Updating Post Meta with AJAX (Seems simple but cannot figure it out)
- AJAX button with success callback. (Titan Framework)
- ajax working when function is on child theme but not in plugin page
- AJAX call to admin-ajax.php by subscriber returns home page
- AJAX call returns ‘testtest0’ instead of ‘test’ – why?
- How to find list of all functions bind to a particular hook from my plugin?
- Can I Hook Into the TinyMCE Insert/Edit Link Button to Use Shortlink For Post?
- Include HTML (Bootstrap Modal Box) with a plugin into my header
- Ajax function is not working on WordPress
- About a programming language starts with [closed]
- Best practice for plugin: always detect admin-ajax call?
- add_action wp_ajax_ not loading in plugin file WP Network
- Why is the form not updating when I select a new sector from the list?
- wordpress automatic update does not run
- Workflow for new importer plugin – your advices?
- Using init hook for register_taxonomy is causing invalid_taxonomy in wp_insert_term()
- Plugin Form Submitting to admin-ajax.php instead of admin-post.php
- Ajax +wordpress onClick link redirect to new page and create html content
- AJAX request not routing through proxy
- How Can I Add Code To A Preexisting Function Without Editing it
- Adding tables to dashboard pages programmatically?
- Setting post_id for single.php based on URL without a redirect
- Get cat parameter from admin-ajax
- WordPress (pagenow link) in ajaxurl change after i change plugin language
- Ajax on the Administration Side of plugin – returns 0
- Action / Hook when a new plugin is added
- apply_filters() and call_user_func() to define and call a function outside a class
- Ajax action has 200 status but response of No response data available for this request
- Jquery php request is returning a weird result
- WordPress Does not grab the string sends useing AJAX response, wp_ajax hook
- Posts form with AJAX request – Plugin development
- GET request return value as error instead of success
- How to control ajax calls without effecting memory of server?
- Bad request 400 using class based files
- Forbidden Error in ajax call with wordpress
- Trying to run a Ajax request from a checkout form in woocommerce via a custom plugin
- “add to cart” links css class “ajax_add_to_cart” doesn’t show in woocommerce in widget sidebar
- Where do I hook to have the server do something in PHP on block attribute change?
- ajax stopped working when not logged in wordpress
- ajax call return 406 not acceptable for non logged users only
- Does $this context change in an AJAX callback?
- ajax response strips multidimensional array and unable to decode
- 400 Bad Request and illegal invocation in wp_ajax based on processData set to false or true
- Rate limiting ajax requests in WordPress
- WordPress Ajax not returning Response
- Post is uncatagorized in publish_post action
- Using AJAX to submit and return data inside the WordPress Plugin Boiler Plate framework
- AJAX call of function containing javascript which is not loaded (Plugin development)
- WordPress Plugin Boilerplate – add actions and/or filters based on user’s role
- Performing ajax request in wordpress
- do_action from within a class does not seem to work
- Inserted data from database does not showing on front-page without referesh page?
- wp_ajax function return the html page
- $_SESSION inside php function executed by AJAX
- Two same AJAX calls – one is working, other doesn’t
- ajax multiple Values
- How to include files in the loop via ajax
- How to handle ajax Request in a complex-structured plugin?
- Using JavaScript in WordPress page to call for server data using AJAX
- Filterable posts using categories
- How to get values from Tinymce visual editor popup?
- remove different admin menu for specific users
- WordPress Reset password Strength set to medium
- Ajax Response Error | just getting error as the response
- How To do Ajax In WordPress Custom Plugin?
- PHP includes with AJAX actions
- admin-ajax.php returns “No Script Kiddies!” sometimes
- WordPress function is not called and ajax return 0
- add_option_{$option} action hook not being called
- Ajax call not working with
- Ajax functionality not being called under wordpress plugin
- Array/List Edit in Backend
- WP Ajax on page load not working on bluehost but was working on Godaddy
- Does WordPress have something like timer hook?
- Ajax not working to insert, query and result data
- WP Cron as Fast as WordPress AJAX?
- action callback, for action dispatched as reported by hook sniffer, not called
- How can I set a dynamic value for post_updated_messages based on return value of post_updated?
- WordPress plugin: admin-ajax.php not passing data to custom function
- Can’t get query string in ajax call
- Ajax url value to pass ‘variable’ to use in query
- Ajax functions – no access to wp-admin.php only online
- An adiitional function fires on my AJAX submit
- Fatal error: Call to a member function query() on a non-object in my ajaxpage
- Page reload occurs before request finishes
- Sending Parameter Failed
- How to remove a class [closed]
- Insert plugin html content to a specific spot in the frontpage
- Apply function on all action hooks?
- PHPUnit Ajax Serialization of ‘Closure’ is not allowed
- Trigger a JavaScript function based on the data fetched from Woo commerce hook
- Return custom product in ajax call loop
- Why my admin-ajax url returns 0 even after adding echo and die() at the end of function?