Title: Discount Code problems
Last modified: January 11, 2021

---

# Discount Code problems

 *  Resolved [snutt](https://wordpress.org/support/users/snutt/)
 * (@snutt)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/discount-code-problems/)
 * Hi.
    We fond an issue with applying the discount codes on the site. This started
   about 2 weeks ago. I have updated wordpress and plug-ins to latest versions but
   the issue is the same.
 * When inserting the discount code and then press the “apply” button i get redirected
   to the log-in page.
 * If i try to insert the code and payment information and NOT klick on the apply
   button but instead the payment button, i come forward and the discount for the
   code is applied, but no information about it.
 * Strange is that everything works as supposed as long as you are logged in on 
   the page. When logged in as admin you can insert the code, klick apply and then
   you see that the code was accepted.
 * Please if i can get any advice what is wrong here!
    /Åsa
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fdiscount-code-problems%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Author [Andrew Lima](https://wordpress.org/support/users/andrewza/)
 * (@andrewza)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/discount-code-problems/#post-13897128)
 * Hi Åsa,
 * Thank you for using Paid Memberships Pro, I’m sorry to hear about this issue 
   you are facing here.
 * I had a look at your checkout page, and noticed that there were some jQuery ‘
   deprecated’ logs in your console log which may affect the apply discount codes.
 * Do you have any plugin that may adjust the jQuery Migrate? Could you please recreate
   the error and have your console log open by pressing ‘CMD + F12’ on Mac or F12
   on Windows and see if there are any errors when you try to apply the code while
   being logged-out?
 * I haven’t been able to replicate this issue.
 *  Thread Starter [snutt](https://wordpress.org/support/users/snutt/)
 * (@snutt)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/discount-code-problems/#post-13897810)
 * Hi, and thanks for your answer.
    I have seen the “deprecated” warnings but not
   sure about what the problem can be. (not an expert reading this info..) So I’m
   not sure about there is a plug in that can affect this.
 * I have tried to recreate the error and checked the console log. It looks like
   this:
 * 1: This printscreen is from before applying the code on the checkoutpage.
    [Img1](https://shape-it.se/wp-content/uploads/2021/01/pilates-1.jpg)
 * 2:This is what shows the moment i hit the “apply” button, just before it redirects
   to the log in page. This flashes for a very short moment, and its differs from
   the print screen above. However, im not sure if this gives any info.
    [Pilates2](https://shape-it.se/wp-content/uploads/2021/01/pilates-2.jpg)
 * I tried install the plug in “jQuery Migrate Helper” and get some information 
   from the actual check-out page: [pilates-3](https://shape-it.se/wp-content/uploads/2021/01/pilates-3.jpg)
 * Hope this gives you some more info!
    /Åsa
 *  Plugin Author [Andrew Lima](https://wordpress.org/support/users/andrewza/)
 * (@andrewza)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/discount-code-problems/#post-13932748)
 * Thanks for the feedback [@snutt](https://wordpress.org/support/users/snutt/),
   would you mind testing this with the default TwentyTwenty or TwentyTwentyOne 
   theme and temporarily disable the jQuery Migrate plugin.
 * Please let me know if this helps.
 *  Thread Starter [snutt](https://wordpress.org/support/users/snutt/)
 * (@snutt)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/discount-code-problems/#post-13933794)
 * Hi, Thanks for you for your reply!
 * After a lot of trouble shooting here, i think i finally found the problem.
 * The page has child theme, ant in the child themes “Functions” there was some 
   kind of script:
 * ?>
    [](https://pilatesnu.se/videos/)Vänta du flyttas nu till inloggningen! <script
   > location.href=”[https://pilatesnu.se/login/&#8221](https://pilatesnu.se/login/&#8221);;
   </script> <? exit;
 * This caused the problem.
 * I removed this script and the discount codes worked to apply again!
    Not sure
   what this script was doing, but the page seems to work without it, so i think
   its fine!
 * /Åsa
 *  Plugin Author [Andrew Lima](https://wordpress.org/support/users/andrewza/)
 * (@andrewza)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/discount-code-problems/#post-13943070)
 * Thanks for the feedback Åsa, glad to hear you have figured this out.

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

The topic ‘Discount Code problems’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/paid-memberships-pro_f1dacb.svg)
 * [Paid Memberships Pro - Content Restriction, User Registration, & Paid Subscriptions](https://wordpress.org/plugins/paid-memberships-pro/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/paid-memberships-pro/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/paid-memberships-pro/)
 * [Active Topics](https://wordpress.org/support/plugin/paid-memberships-pro/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/paid-memberships-pro/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/paid-memberships-pro/reviews/)

## Tags

 * [paidmembershipspro](https://wordpress.org/support/topic-tag/paidmembershipspro/)

 * 5 replies
 * 2 participants
 * Last reply from: [Andrew Lima](https://wordpress.org/support/users/andrewza/)
 * Last activity: [5 years, 4 months ago](https://wordpress.org/support/topic/discount-code-problems/#post-13943070)
 * Status: resolved