Skip to content

Fix for discount code settings not overriding level settings#50

Merged
andrewlimaza merged 2 commits intostrangerstudios:devfrom
dwanjuki:fix-discount-code-expiration
Mar 30, 2026
Merged

Fix for discount code settings not overriding level settings#50
andrewlimaza merged 2 commits intostrangerstudios:devfrom
dwanjuki:fix-discount-code-expiration

Conversation

@dwanjuki
Copy link
Copy Markdown
Contributor

All Submissions:

Changes proposed in this Pull Request:

The discount code request parameter has a pmpro prefix since 3.0.
Updating the pmpro_checkout_level callback with the pmpro_discount_code request parameter.
Ensures expiration dates from discount codes are applied to the level at checkout.

Resolves #49

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you successfully run tests with your changes locally?

Changelog entry

Fixed issue where expiration dates in discount codes may not be applied.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the checkout-level expiration override logic so discount-code expiration settings are applied correctly at checkout when using the (PMPro 3.x) pmpro_discount_code request parameter, addressing issue #49.

Changes:

  • Update pmpro_checkout_level callback to read the pmpro_discount_code request parameter when resolving the discount code ID.
  • Minor formatting: add a trailing newline at end of file.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@andrewlimaza andrewlimaza merged commit 079d998 into strangerstudios:dev Mar 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Discount code expiration date does not override level expiration date

3 participants