티스토리 수익 글 보기

티스토리 수익 글 보기

Allow bypassing max ticket limit when using coupon code by timiwahalahti · Pull Request #990 · WordPress/wordcamp.org · GitHub
Skip to content

Conversation

@timiwahalahti
Copy link
Collaborator

Sometimes, there is a need for a sponsor or a company to buy more than the maximum allowed tickets per purchase. Currently, the maximum number of tickets per purchase is 10.

These needs typically go hand in hand with coupon codes. So this PR adds a bulk buy yes/no field to coupon options, message about changed max quantity when coupon is applied and an filter to override max quantity also after coupon with bypass has been applied. When bulk buy is active, triple the normal max quantity.

Fixes #740

Props @jaz-on, @coreymckrill

Screenshots

image image

How to test the changes in this Pull Request:

  1. Open WordCamp site dashboard
  2. Create ticket
  3. Create coupon code, you should see the new setting set value to yes
  4. Open tickets page, max quantity should be 10
  5. Apply coupon code, max quantity should be 30 and message shown
  6. Add following lines to mu-plugins/sandbox-functionality.php
add_filter( 'camptix_max_tickets_per_order', function() {
  return 1;
} );
  1. Open tickets page without coupon, max quantity should be 1
  2. Apply coupon, max quantity should be 3
  3. Proceed and buy tickets

@timiwahalahti timiwahalahti marked this pull request as ready for review July 28, 2023 23:17
@jaz-on
Copy link

jaz-on commented Jul 31, 2023

Many thanks @timiwahalahti this will be very helpful for future WCEU editions specifically as we’re offering coupons for more than the current limit of tickets allowed in one single order for main sponsors.

Copy link
Contributor

@outdoor2kode outdoor2kode left a comment

Choose a reason for hiding this comment

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

Checked the logic and did testing. It looks good.
Screenshot 2024-04-30 at 03 52 22

@outdoor2kode outdoor2kode merged commit 8fd4bcc into WordPress:production Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

CampTix: Allow bypassing the 10 ticket per order limit with a special link?

3 participants