I created a custom WordPress Payment Plugin for WooCommerce, Everything is working fine. When I try to use wp_redirect('url');
page starts to load in Browser Network, but the page is not redirecting it gives me the following error:
SyntaxError: Unexpected token < in JSON at position 0
Wrap your redirect if not doing an ajax request.