Witam,
Po wysłaniu formularza w konsoli zwraca:
Redirect from 'http://kuk-inwest.pl/wp-content/themes/kuk-template/form.php' to 'http://localhost/wordpress/kontakt/' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://www.kuk-inwest.pl' is therefore not allowed access.
Mail jest wysyłany, ale bez danych z formularza. Co może być tego powodem?
Kod pliku z AJAX:
$(".custom-form").submit(function(e) {
e.preventDefault();
var url = "http://kuk-inwest.pl/wp-content/themes/kuk-template/form.php";
$.ajax({
type: "POST",
url: url,
data: $(".custom-form").serialize(),
success: function() {
$('.submit-notify').text("Wysłano");
}
});
e.preventDefault();
});