WordPress.org

Forums

Paid Memberships Pro
[resolved] Coupon error: 'Error applying discount code [1]' (5 posts)

  1. Chris Van Patten
    Member
    Posted 1 year ago #

    I'm using WP 3.6 w/ the latest version of PM Pro.

    While everything previously worked fine, I now get an error message: 'Error applying discount code [1]' whenever I try to apply a coupon code.

    I'm using a custom template for my checkout page; it was built around version 1.6. Were there any changes in recent versions that might be causing this breakage?

    http://wordpress.org/plugins/paid-memberships-pro/

  2. Jason Coleman
    Member
    Plugin Author

    Posted 1 year ago #

    Hi, Chris!

    Yes. There were some updates to the checkout page that you'll have to incorporate into your older checkout template.

    Namely, we upped the timeout from 2000 to 5000. So that might help (this sometimes shows up when the AJAX request times out). There is a filter there now as well to override it.

    The other change made is that the AJAX calls are made to admin_url instead of home_url. Sometimes your home_url might be a static page that isn't loading WP or processing PHP/etc.

    Here's the bit you'll want to look at:
    https://github.com/strangerstudios/paid-memberships-pro/blob/dev/pages/checkout.php#L127

    And the same update to some similar code further down the page:
    https://github.com/strangerstudios/paid-memberships-pro/blob/dev/pages/checkout.php#L592

  3. Chris Van Patten
    Member
    Posted 1 year ago #

    Thanks so much Jason. I'll get these fixes incorporated and report back if/when it all works again.

    Thanks!

  4. Slocum Themes
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Chris,

    I just wanted to check in and see if you were able to get everything straightened out?

    Thank You

  5. Slocum Themes
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Chris,

    Just wanted to check in one more time before I resolve this ticket. We're you able to get everything straightened out?

    Thank You

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Paid Memberships Pro
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic