Restrict bulk buy max to coupon target ticket only#38
Open
dd32 wants to merge 1 commit intoproductionfrom
Open
Restrict bulk buy max to coupon target ticket only#38dd32 wants to merge 1 commit intoproductionfrom
dd32 wants to merge 1 commit intoproductionfrom
Conversation
The bulk buy coupon option (tix_bypass_max_tickets_per_order) was increasing the max tickets per order globally for all ticket types, not just the tickets the coupon applies to. This meant non-target tickets could also be purchased in bulk quantities. Now the increased max is only applied per-ticket when the coupon is actually applied to that ticket, using a local variable instead of mutating the shared max_tickets_per_order. Fixes WordPress#1305 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
tix_bypass_max_tickets_per_ordercoupon option was globally increasing the max tickets per order for ALL ticket types, not just the tickets the coupon targetstix_coupon_applied === true)Changes
Three locations in
camptix.phpwere fixed:$max_tickets_per_orderbump when coupon is loaded$ticket_maxvariable instead of mutating the shared$max_tickets_per_order$item_maxthat only bumps the max for coupon-applied ticketsTest plan
Fixes WordPress#1305
🤖 Generated with Claude Code