Customization Examples
Keep custom behavior in a small site plugin or child theme. Use the plugin’s hooks before replacing templates or changing frontend behavior.
Change the default ticket quantity
Section titled “Change the default ticket quantity”This filter supplies an initial quantity of three for competition products:
add_filter( 'competitions_for_woocommerce_product_default_ticket_quantity', static function ( $quantity, $product ) { return $product instanceof WC_Product_Competition ? 3 : $quantity; }, 10, 2);The product getter still constrains the returned quantity to applicable minimum and maximum purchase quantities. This changes the initial selection; it does not grant extra entries or bypass ticket limits.
Curated product grids
Section titled “Curated product grids”For content-only layout changes, use a filtered shortcode instead of a custom product query:
[competitions category="weekly-draws" limit="6" columns="3" paginate="true"]Replace the category with an existing product category slug.
Validate changes
Section titled “Validate changes”Test a future competition, an active competition, a sold-out competition, and a finished competition. Include customer-selected and randomly assigned tickets if the store uses both. For checkout changes, verify the saved order and entry records as well as the visible page.
