Issue Solved I was missing a closing brace for data…
jQuery(document).ready(function($){
$("#login_otp_btn").click(function(event){
val();
event.preventDefault();
jQuery.ajax({
url: wpac_ajax_url.ajax_url,
type:'POST',
data :{
dataType:'JSON',
action : 'login_ajax_callback',
login : $("#login_mobile").val(),
}
success:function(response){
console.log("url wpac " + wpac_ajax_url.ajax_url);
if(response !== ""){
response = JSON.parse( response );
console.log(response);
}else{
console.log("Response is empty");
}
},
});
$("#login_otp_field").show();
})
});
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 Ajax Callback
- 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
- 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
- Determining where fopen() is writing files when used from WordPress AJAX call [closed]
- How Restrict access to admin dashboard by specific static ip?
- Overide a function that is inside a plugin
- How to get images from EDD post?
- How to install and activate a plugin via an external PHP script
- How to remove xmlns on language_attributes()?
- Add keywords meta to index.php page
- Download any file after submitting a form [closed]
- Redirecting a buddyboss profile tab to a different tab if not subscribed to a specific membership
- How can I inject options into an select tag inside the widget form?
- Init plugin again after ajax call finish
- How to create a custom post type that contains another custom post type?
- WP Query. Is there a maximum size?
- Can i add custom code in Source, Header from function.php?
- How to make multiple admin pages for one plugin?
- Problem with isset and $_POST
- Redeclare function after plugin activation
- get_edit_post_link() not working on wp-cron
- Woocommerce Backend Search by Title and SKU
- Comment “like” problem – “users who like this” avatar linking to current user profile instead of “liker’s” profile
- I want to generate the pdf and save it in library?
- Trying to make a simple wordpress plugin, having difficulties understanding how to make it?
- WordPress API functions not working at AJAX functions.php call
- wordpress plugin license issue -New plugin development
- add_action for publish_post doesn’t work
- How to proper escape echo inside a javascript tag
- How to convert Currency from USD to other IP Based currency in Php function
- WordPress + python integration
- Newbie problem with adding include wp_footer
- Hide content for specific users with id
- adding dynamic/multiple slug values in ‘option_none_value’
- Get post content inside plugin class method
- Python in WordPress – A “Hello World” implementation
- Restrict role to use a plugin
- Ajax Load More on Hierarchical Categories
- Use WP_Query for custom post type but result get empty
- Same Title on two different post type with single custom taxonomy
- Every time I use wp_get_current_user() my plugin breaks
- Need help integrating plugin into theme
- Saving plugin data returns “You do not have sufficient permissions to access this page.”
- My wordpress site wont load, it gives header error warnings
- Can anyone see a syntax error in this? [closed]
- wp_handle_upload – specified file failed upload test
- Split Million WordPress Post’s Into Multiple Database Server
- wordpress admin-ajax bad request 400