New answers tagged

0 votes

redirect does not work in ajax function

It's some years behind but I think this answer can help others: I have used a function to redirect from a JS AJAX call. First, it sets some values to database and then tries to redirect in this way: ...
user avatar
0 votes

Can part of my WordPress website be headless?

You can mount a react or a vue app partially into a page, so what you ask is theoretically possible but probably not the best solution. You may consider expanding the react application a bit and go ...
user avatar
0 votes

Ajax callback not work

The problem is a basic PHP issue, you told WordPress to call a function named get_data_from_form when the wp_ajax_get_data_from_form action happens] add_action('wp_ajax_get_data_from_form', '...
user avatar
  • 51.7k
0 votes

Add a class to WooCommerce error message with specific text

Have your tried to do it via PHP by finding the hook of the woocommerce error message? Maybe this tutorial helps to understand what I mean: https://quadlayers.com/change-woocommerce-checkout-error-...
user avatar
2 votes
Accepted

Contact form 7 Hide response messages after 5 seconds

you can use below code to hide message // Contact Form 7 submit event fire document.addEventListener('wpcf7submit', function(event) { setTimeout(function() { jQuery('form.wpcf7-form')....
user avatar
0 votes

WordPress blocking polling request when signed into Admin

Hence, ajax calls that must be triggered from within the wp admin panel should be registered via the wp_ajax_{$action} hook, and ajax calls that are triggered from the frontend and have totally ...
user avatar
0 votes

AJAX call inside plugin class is not getting to it's response function

Problem seems with build_a_boat() function. You called that function from inside a template file. Does that gets called on the desired page load? Solution: Try to call that function from plugin root ...
user avatar
  • 11

Top 50 recent answers are included