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 extend WordPress Bookly plugin
- How to load wp_editor via AJAX
- Simple form that saves to database
- How to call plugin path in JS?
- How can I pass a variable to wp_ajax action?
- How to pass JavaScript variable to PHP in wordpress widget?
- AJAX Call Via Vanilla JavaScript In WordPress Plugin Development
- Custom plugin giving: wp-admin/admin-ajax.php 400 (Bad Request)
- How can I make content disappear when a user logs in?
- Create Proper WordPress Ajax Request in JavaScript, NOT jQuery
- Multi step form, custom plugin
- ‘Lazy loading’ list of posts with pagination
- Errors while using ajax from external wordpress page
- shortcode doesn’t work
- How to include admin-ajax when loading external javascript
- White text on white background in TinyMCE when wp_editor is called in WP 3.9
- Is it possible to filter the wp_footer() scripts, read the content, and insert them inline?
- How can I make the “Preview Post” button save and preview in the same window?
- Custom WordPress+PHP+MYSQL+AJAX form, submit event not captured by Javascript, but does POST data to the DB
- Creating an Exit Confirmation Popup
- Difference between register_block_type & wp.blocks.registerBlockType
- How to create popup same as wordpress popup feature
- How to add pagination to wpbakery grid?
- jQuery Plugin to use WordPress functions in AJAX request
- Pass a php string to a javascript variable
- WordPress Ajax Callback
- WordPress Plugin Page is Loading in Admin Content Container Instead of Separate Page
- How to trigger $_GET request within admin plugin page?
- WooCommerce get_price returning wrong price when used via ajax
- add mediaelement.js plugins into WordPress video player control bar
- Custom form action to handle data inside a plugin
- Pulling data from custom plugin settings using PHP shortcode and Javascript
- Form isn’t inserting data into database with ajax 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
- add image crop function like in wp customizer
- Calculate price and display on woocommerce product single page under price (simple price, variable price) [closed]
- How to edit content before post update
- Adapt PHP form action for WordPress?
- Ajax call returning 0
- WordPress + JavaScipt + AJAX + MySQL: insert query for form
- 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 load wp_editor via AJAX
- WP Plugins – Use includes to display page content
- How to get my plug-in, wrote in php, to refresh on its own every 5 minutes?
- Using color picker in plugin, does input attribute order matter?
- Using TinyMCE in plugin?
- Using window.onload with Ubermenu
- Redirect to another page using contact form 7? [closed]
- AJAX fileupload – TypeError: not a function ajaxSubmit()
- Call plugin with php function
- JavaScript in a PHP plugin
- Does having more than 30 Admin Ajax affects site performance (plugin)?
- Submit Form data to another page via Ajax (WordPress Way)
- Ajax Plugin Not Echoing Response
- Pass user role to javascript code inside body
- get specific value of a array | PHP
- Background Music WP [closed]
- Asynchronous request in wordpress
- Submitting a form, using Ajax, to run a SQL Select query based on user input from the form
- How to use custom Javascript code inside a plugin?
- Adding a simple Javascript file with a plugin
- File Uploader – Upload without adding to Media Library
- Plugin not working locally, but works on server
- Passing PHP Variables to AJAX Loaded Pages
- How to redirect to a page after the form is submitted
- Echo out element to another page.
- Social share buttons text shows up on post excerpts
- Help with customising love it plugin (use within foreach)
- My ajax request don´t work and return 0
- Number format in thousands on highcharts in wpdatatable plugin
- WordPress environment not loading properly
- Embed Javascript code to registered users only
- Creating new option (add_option) from AJAX – Settings API
- How to create a dashboard for logged-in users with custom functionality? [closed]
- Creating a user ‘add custom field’ section