So, if anyone has the same problem, I think this was the issue:
I had the button inside of a div that was hidden until the user selected an option from the drop box. I think the problem was that the ajax script wasn’t connecting with the button, because the button didn’t exist when the page and script originally loaded. If that makes sense. I changed it so that the button is in a different part of the page and hides after the page loads and it works perfectly now.
Related Posts:
- coding a WordPress AJAX Form using PHP to check if User is Logged Out and Show error
- How to save Clicks of a download link button while it doesn’t matter if we refresh the page or again login/logout
- 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
- Shortcode button dosent work for all posts. Work for first post only
- Using a custom plugin to capture input data via Ajax and PHP
- How to insert HTML/JavaScript form into WordPress page? [closed]
- wordpress add_action() issue in ajax call
- How to get specific string/value from an array? php [closed]
- 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
- Calling PHP function with AJAX
- Use AJAX to fetch Current Post Thumbnail for WordPress when Uploaded throughMedia Uploader Frontend
- Ajax call to php function doesn’t work PHP code
- Conditional Fields depending on checkboxes
- How to limit each front-end user to view just his own uploaded files on Amazon S3?
- how to show selected options drop down menu values in attributes field in after saving post.php
- How do I call an action hook into wp_ajax hook callback function
- How to load wp_editor via AJAX
- How can I pass a variable to wp_ajax action?
- How to pass JavaScript variable to PHP in wordpress widget?
- Create Proper WordPress Ajax Request in JavaScript, NOT jQuery
- Multi step form, custom plugin
- Errors while using ajax from external wordpress page
- shortcode doesn’t work
- Difference between register_block_type & wp.blocks.registerBlockType
- jQuery Plugin to use WordPress functions in AJAX request
- Pass a php string to a javascript variable
- WordPress Plugin Page is Loading in Admin Content Container Instead of Separate Page
- How to trigger $_GET request within admin plugin page?
- add mediaelement.js plugins into WordPress video player control bar
- Custom form action to handle data inside a plugin
- How to put JQuery/Ajax inside shortcode?
- wordpress site | All-in-one-cufon IE Issue
- Can I use custom CSS and js plugin to put JavaScript in to validate my forms
- How to get the element ID from new menu list that added with add_filter()?
- Override Plugin Script Fucnction in WordPress
- WordPress WPforms customization
- Adapt PHP form action for WordPress?
- Ajax call returning 0
- Ajax fail and get 504 error
- Take input from form and pass it to function using a wp-plugin
- admin-ajax.php warning max input vars exceeded on layered pop plugins [closed]
- How to get my plug-in, wrote in php, to refresh on its own every 5 minutes?
- Using TinyMCE in plugin?
- Using window.onload with Ubermenu
- Submit Form data to another page via Ajax (WordPress Way)
- Ajax Plugin Not Echoing Response
- get specific value of a array | PHP
- Asynchronous request in wordpress
- Plugin not working locally, but works on server
- Echo out element to another page.
- Using AJAX to run SQL statement and populate dropdown
- uncaught TypeError: Cannot read properties of null (reading ‘classList’) custom plugin
- Custom Plugin scripts from admin working in frontend
- can’t unzip file
- Using Ajax to submit a form, and run a SQL Select query based on user input from the form
- Strange admin-ajax / CSS / $_SESSION issue
- Jquery POST Ajax Return null data in wordpress
- WP Ajax DB issues
- In a plugin, How to update a json file using ajax
- Ajax Call not Working in Plugin
- How to get a specific string from a url
- 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?
- JS working when used normally but not in wordpress
- 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
- Problem with wordpress has_action() function
- Why is my form going to frontend on html form submission present on the php files inside my custom plugin?
- Multiple image selection custom widget
- AJAX update fails for public/non-admin users
- How to disable/enable PHP plugin functionality based on a TinyMCE toggle-button
- Speeding up WordPress on a Local Network
- submit form data to wordpress existing database table using my plugin
- Custom plugin giving: wp-admin/admin-ajax.php 400 (Bad Request)
- Caching of combined CSS and JS fails because of losing MIME types through combining by PHP
- get/show Last ID
- Help with customising love it plugin (use within foreach)
- Number format in thousands on highcharts in wpdatatable plugin
- WordPress environment not loading properly
- Embed Javascript code to registered users only
- Media Playlist Plugin
- How to set up php,javascript and css to allow for our finished product to be displayed within a page?
- Saving custom form fields
- display user input using ajax in wordpress
- Ajax, jQuery and WordPress
- Hyperlink to execute PHP
- How to get site homepage from plugin?
- Capturing POST data
- Pulling Advanced Custom Fields from other pages
- Undefined variable _POST
- Response from Php File to Ajax is not getting sent
- Plugin Admin Page Ajax-Admin call returning 0, URL set correctly. Implemented localized scripts but did not fix it
- How do I output user_registered time in my correct timezone?
- How to prevent page load on form submission
- Load css classes after using ajax calls
- How to make a rest style plugin?
- WordPress portfolio pagination on home page
- Adding a script & php to functions.php