Title: Making request from ajax
Last modified: November 26, 2018

---

# Making request from ajax

 *  Resolved [wpdiv](https://wordpress.org/support/users/bilimokur/)
 * (@bilimokur)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/making-request-from-ajax/)
 * Hello. Thank you for your license api. I have some quetions. Can you share a 
   working example for ajax request? Because i got cross browser error all time.
 * I am trying to make ajax request to this url.
    `https://mysite.com/wp-admin/admin-
   ajax.php?action=license_key_activate&key etc...`
 * But all time got “No ‘Access-Control-Allow-Origin’ header is present on the requested
   resource.” error.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Contributor [10Quality](https://wordpress.org/support/users/10quality/)
 * (@10quality)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/making-request-from-ajax/#post-10928231)
 * If you are getting a **“No ‘Access-Control-Allow-Origin’ header is present on
   the requested resource.”** sounds that you are having an issue with the way your
   wordpress setup is configured to handle requests headers.
 * We would recommend you to take a look at how you can modify them since we ain’t
   modifying them at all in the plugin.
 * Usually this can be fixed by modifying the `.htaccess` file on your wordpress
   root. Here is an article that explaing this better:
    [https://crunchify.com/how-to-fix-access-control-allow-origin-issue-for-your-https-enabled-wordpress-site-and-maxcdn/](https://crunchify.com/how-to-fix-access-control-allow-origin-issue-for-your-https-enabled-wordpress-site-and-maxcdn/)
 * Plugins like W3 Total Cache may also be affecting the CORS origin issue.
 * Regards.
 *  Plugin Contributor [10Quality](https://wordpress.org/support/users/10quality/)
 * (@10quality)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/making-request-from-ajax/#post-10932549)
 * Version 1.2.0 includes an option in the settings to override WordPress headers
   and to set any CORS related headers for the API.
 * Please check it out, make sure **Allow Credentials** (**Access-Control-Allow-
   Credentials**) is set to `true` to allow successful javascript calls.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Making request from ajax’ is closed to new replies.

 * ![](https://ps.w.org/woo-license-keys/assets/icon.svg?rev=2078245)
 * [License Keys for WooCommerce](https://wordpress.org/plugins/woo-license-keys/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woo-license-keys/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woo-license-keys/)
 * [Active Topics](https://wordpress.org/support/plugin/woo-license-keys/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woo-license-keys/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woo-license-keys/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [10Quality](https://wordpress.org/support/users/10quality/)
 * Last activity: [7 years, 6 months ago](https://wordpress.org/support/topic/making-request-from-ajax/#post-10932549)
 * Status: resolved