The BACT FlexPass Checkout plugin modifies the workflow for using coupons that are identified as being of the FlexPass type.
- Make Sure the “Flexpass” Taxonomy added in the coupon section
- To add taxonomy to the coupon click Woo-commerce >Coupon Categories
- Please Make Sure before purchasing flexpass, check flexpass product is assigned with “CiviCRM Financial Type” to “Flex Passes”
- Please check the configuration of flexpass product properly for which event or all event date you need to apply flexpass
- Exclude Donation product from coupon code while adding flexpass coupon code product or manual coupon code creation.
- If any user purchases the flexpass then the user get flex pass coupon code and in the admin panel the coupon is added with taxonomy flexpass
- While creating manual flexpass coupon please check for which event date you want to apply the coupon and set the discount amount or discount %age
Frontend Section (Directory Name: frontend)
add_filter( 'qsot-before-ticket-selection-form', array( $this, 'add_popup_form' ), 10 );
// Adding coupon Flex Pass popup form on checkout page.
add_action( 'woocommerce_before_checkout_form', array( $this, 'add_popup_form_checkout' ), 10 );
// Adding coupon Flex Pass popup form on cart page.
add_action( 'woocommerce_before_cart', array( $this, 'add_popup_form_checkout' ), 10 );
// Adding sold out label to product.
add_filter( 'woocommerce_sale_flash', array( $this, 'lx_custom_onsale_label'), 10, 2 );