It looks odd to me that your ajax_shortcode_function()
registers and enqueues your ajax script. According to the codex, you should register/enqueue in functions.php. Additionally, if you only need the url to ajax-admin.php, the tutorial says you can use the global ajaxurl
variable and therefore you don’t need to localize your script.
The other thing that looks odd is my_submit_process()
seems to be located within ajax_shortcode_function()
. I’d check that the closing brace is in the correct location and try again if it isn’t.
Related Posts:
- How can I pass a variable to wp_ajax action?
- How to pass JavaScript variable to PHP in wordpress widget?
- How to save Clicks of a download link button while it doesn’t matter if we refresh the page or again login/logout
- Errors while using ajax from external wordpress page
- Ajax call doesn’t work in frontend but it’s working in backend (when I’m logged in)
- How to use wp-ajax in wp-cron
- How to add pagination to wpbakery grid?
- WordPress Plugin Page is Loading in Admin Content Container Instead of Separate Page
- WooCommerce get_price returning wrong price when used via ajax
- Shortcode button dosent work for all posts. Work for first post only
- How to put JQuery/Ajax inside shortcode?
- Using a custom plugin to capture input data via Ajax and PHP
- Ajax call returning 0
- admin-ajax.php warning max input vars exceeded on layered pop plugins [closed]
- Using color picker in plugin, does input attribute order matter?
- Call plugin with php function
- Does having more than 30 Admin Ajax affects site performance (plugin)?
- wordpress add_action() issue in ajax call
- How to get specific string/value from an array? php [closed]
- coding a WordPress AJAX Form using PHP to check if User is Logged Out and Show error
- Asynchronous request in wordpress
- Plugin not working locally, but works on server
- Passing PHP Variables to AJAX Loaded Pages
- Ajax call not working in wordpress through a plugin
- Send Array from JS to php file then insert it in wp database through a plugin
- can’t unzip file
- Strange admin-ajax / CSS / $_SESSION issue
- How do I reinit WordPress plugins dynamically using jS?
- How can I adjust my function so the page editor still loads in the backend?
- WP Ajax DB issues
- Calling PHP function with AJAX
- In a plugin, How to update a json file using ajax
- Can you add a shortcode to a custom post type that gets the post_title, post_content, etc. and then passes that to a plugin function?
- Use AJAX to fetch Current Post Thumbnail for WordPress when Uploaded throughMedia Uploader Frontend
- How to use Datatable with Ajax when creating plugin on WordPress?
- How to avoid the 403 Forbidden error in a WP Plugin with Ajax and PHP
- wp-admin/admin-ajax.php 400 (Bad Request) plugin
- Ajax call to php function doesn’t work PHP code
- Compare Ajax Data Results
- Conditional Fields depending on checkboxes
- Help with customising love it plugin (use within foreach)
- My ajax request don´t work and return 0
- WordPress environment not loading properly
- Creating new option (add_option) from AJAX – Settings API
- How to limit each front-end user to view just his own uploaded files on Amazon S3?
- AJAX doesn’t pass variables to the php function in the plugin
- How do I convince this button to do something when it is clicked?
- display user input using ajax in wordpress
- Hyperlink to execute PHP
- How to get site homepage from plugin?
- Pulling Advanced Custom Fields from other pages
- Response from Php File to Ajax is not getting sent
- Help me with my first very basic plugin
- WordPress portfolio pagination on home page
- How do I call an action hook into wp_ajax hook callback function
- WordPress Hook that will run when media file deleted
- Post source link plugin – small modification
- Which hook callback has priority if both plugin and theme use the same hook?
- How can I make the “Preview Post” button save and preview in the same window?
- Cannot run the code after I activate the plugin
- Displaying admin notice dynamically
- Get total number of comment of the posts written by an author
- Why plugin ajax response is -1?
- Sending email from inside a plugin using PHP PEAR
- Adding an Options Page to a Plugin
- How do I “get the next 10 posts after post_id == x”?
- Customizing NEXTGEN Gallery To link images to pages
- WooCommerce specifc variations for specific user role [closed]
- Nested shortcode functions accessing variable
- Ability to automatically redirect a URL
- Passing Page ID used in Meta Box Creation to JavaScript
- How to handle cookies from a WordPress plugin on a cached page?
- Activate my plugins via FTP
- How to add apply_filter for a class property in plugin
- A server-side hook failed when committing plugin code to SVN
- Content-Security-Policy Headers are there and showing the correct settings, but still getting a refused connection
- Need to replace Currency Shortforms
- How to delete all categories programatically?
- File Uploader – Upload without adding to Media Library
- WordPress subfolder installation AJAX Problem
- Building a plugin into a theme
- Trying to include files in plugin isn’t working
- implement custom roles in custom plugin
- How to get current cart values using WC_Shortcodes?
- How to authorize viewing and clicking a function only logged users?
- How to arrange custom posts in the backend/admin by custom taxonomy
- Adding LOAD MORE on a page
- implement checkbox or toggle switch in plugin code
- How can I use wp_ajax_response for front-end error reporting?
- Adding link on title its in description but not in title see screenshots attached
- How to save information related to post in database?
- Save selectlist value (taxonomy) in wp:wp_set_object_terms
- Page doesn’t load
- Xml output not places where i want
- How to fix ‘Call to undefined function do_settings()’ error?
- Passing an input variable through a switch statement
- Posts in Admin only display 1 Post instead of all Post in admin area
- How can I save the selected page in the dropdown after anyone clicks on Save Changes?
- Select posts from list and add them in a new list
- plugin doesn’t retrieve data from database