Filter Hooks Reference
This page provides the complete directory of all filter hooks prefixed with qcw_ across ticket handling, instant wins, cart validation, participants, queries, and administrative settings.
1. Ticket Generation & Numbers
Section titled “1. Ticket Generation & Numbers”qcw_ticket_number_display_html
Section titled “qcw_ticket_number_display_html”Filters the rendered output of a ticket number across checkout, customer account, order emails, and grids.
- Arguments:
(string|int $ticket_number, WC_Product $product)
add_filter( 'qcw_ticket_number_display_html', function( $ticket_number, $product ) { return '<span class="custom-badge">#' . esc_html( $ticket_number ) . '</span>';}, 10, 2 );qcw_ticket_number_tab_display_html
Section titled “qcw_ticket_number_tab_display_html”Filters ticket number HTML formatting within tabbed pagination grids.
- Arguments:
(string $html, int $ticket_number, int $product_id)
qcw_start_ticket_number
Section titled “qcw_start_ticket_number”Filters the starting index number of tickets for a competition (e.g. 1 or 1001).
- Arguments:
(int $start_number, int $product_id)
qcw_generate_available_tickets
Section titled “qcw_generate_available_tickets”Filters the complete array of available ticket numbers prior to rendering the selector grid.
- Arguments:
(array $available_tickets, int $product_id)
qcw_generate_random_ticket_numbers
Section titled “qcw_generate_random_ticket_numbers”Filters the requested quantity and arguments when generating random ticket allocations.
- Arguments:
(array $tickets, int $quantity, int $product_id)
qcw_generate_random_ticket_numbers_return
Section titled “qcw_generate_random_ticket_numbers_return”Filters the final returned pool of random ticket numbers.
- Arguments:
(array $tickets, int $product_id)
qcw_random_winner_number
Section titled “qcw_random_winner_number”Filters the selected winning ticket number produced by the randomizer engine.
- Arguments:
(int $winning_number, int $product_id)
2. Instant Wins
Section titled “2. Instant Wins”qcw_get_lottery_instant_ticket_numbers_prizes_field
Section titled “qcw_get_lottery_instant_ticket_numbers_prizes_field”Filters the raw instant win prizes data string/array saved on a competition product.
- Arguments:
(mixed $prizes, int $product_id)
qcw_get_lottery_instant_ticket_numbers_prizes_field_total
Section titled “qcw_get_lottery_instant_ticket_numbers_prizes_field_total”Filters the total count of instant win tickets configured for a competition.
- Arguments:
(int $total, int $product_id)
qcw_get_instant_winners_count
Section titled “qcw_get_instant_winners_count”Filters the count of claimed instant win prizes.
- Arguments:
(int $count, int $product_id)
qcw_get_instant_winning_prizes_count
Section titled “qcw_get_instant_winning_prizes_count”Filters the count of remaining unclaimed instant win prizes.
- Arguments:
(int $count, int $product_id)
qcw_get_grouped_instant_prizes
Section titled “qcw_get_grouped_instant_prizes”Filters the grouped instant prizes array (aggregating identical prizes for frontend tables).
- Arguments:
(array $grouped, int $product_id)
qcw_get_instant_prize_counts
Section titled “qcw_get_instant_prize_counts”Filters the statistical count of instant prizes per tier.
- Arguments:
(array $counts, int $product_id)
qcw_get_instant_winner_counts
Section titled “qcw_get_instant_winner_counts”Filters the count of winners per prize tier.
- Arguments:
(array $counts, int $product_id)
qcw_grouped_prizes_columns
Section titled “qcw_grouped_prizes_columns”Filters the table columns shown in the frontend grouped instant win prizes table.
- Arguments:
(array $columns)
qcw_instant_winners_per_page
Section titled “qcw_instant_winners_per_page”Filters the pagination row count on the instant winners list table (default: 10).
- Arguments:
(int $per_page)
qcw_prizes_per_page
Section titled “qcw_prizes_per_page”Filters the pagination count on the prizes table.
- Arguments:
(int $per_page)
qcw_instant_win_order_message
Section titled “qcw_instant_win_order_message”Filters the success notification displayed on the Order Received / Thank You page when winning an instant prize.
- Arguments:
(string $message, int $item_id, WC_Order_Item_Product $item, WC_Order $order, bool $plain_text, WC_Product $product)
qcw_instant_winners_template
Section titled “qcw_instant_winners_template”Filters the template file path used to render the instant winners list.
- Arguments:
(string $template_path)
qcw_instant_import_chunk_size / qcw_instant_import_chunk_size_images
Section titled “qcw_instant_import_chunk_size / qcw_instant_import_chunk_size_images”Filters the batch processing chunk size when importing instant win prizes via CSV.
- Arguments:
(int $chunk_size)
3. Cart, Validation & Quantities
Section titled “3. Cart, Validation & Quantities”qcw_add_to_cart_validation_qty
Section titled “qcw_add_to_cart_validation_qty”Filters whether the requested ticket quantity passes per-user and per-order limits.
- Arguments:
(bool $passed, int $product_id, int $quantity)
qcw_max_purchase_quantity
Section titled “qcw_max_purchase_quantity”Filters the maximum ticket purchase quantity allowed in a single transaction.
- Arguments:
(int $max_qty, int $product_id)
qcw_wrong_answer_display_item_meta
Section titled “qcw_wrong_answer_display_item_meta”Filters the notice displayed in cart item meta when an incorrect answer is entered.
- Arguments:
(string $text, array $item_data)
qcw_answer_in_order
Section titled “qcw_answer_in_order”Filters the formatted question answer text attached to the completed order.
- Arguments:
(string $answer_text, int $answer_id, int $order_id)
qcw_update_stock_qty
Section titled “qcw_update_stock_qty”Filters whether competition ticket stock counts are synchronized with WooCommerce product stock.
- Arguments:
(bool $update, int $product_id)
qcw_order_fully_refunded_status
Section titled “qcw_order_fully_refunded_status”Filters the order status trigger for releasing tickets on full refund.
- Arguments:
(string $status)
4. Participants, Queries & Tables
Section titled “4. Participants, Queries & Tables”qcw_participants
Section titled “qcw_participants”Filters the complete array of participant records retrieved for a competition.
- Arguments:
(array $participants, int $product_id)
qcw_add_participants_from_order / qcw_remove_participants_from_order
Section titled “qcw_add_participants_from_order / qcw_remove_participants_from_order”Filters whether participant rows are added or removed during order status transitions.
- Arguments:
(bool $proceed, WC_Order $order)
qcw_participating_message
Section titled “qcw_participating_message”Filters the message banner shown to customers on their My Account competition pages.
- Arguments:
(string $message, int $product_id)
qcw_my_tickets_endpoint_query_args
Section titled “qcw_my_tickets_endpoint_query_args”Filters query arguments when fetching active entered tickets for the logged-in customer.
- Arguments:
(array $query_args, int $user_id)
qcw_my_tickets_past_endpoint_query_args
Section titled “qcw_my_tickets_past_endpoint_query_args”Filters query arguments when fetching historical/closed entered tickets for the customer.
- Arguments:
(array $query_args, int $user_id)
qcw_entry_list_columns / qcw_entry_list_sortable_columns
Section titled “qcw_entry_list_columns / qcw_entry_list_sortable_columns”Filters the columns and sortable column headers of the frontend/admin participant table.
- Arguments:
(array $columns)
qcw_entry_list_query / qcw_entry_list_query_orderby
Section titled “qcw_entry_list_query / qcw_entry_list_query_orderby”Filters the SQL query and orderby clause for the competition entry list.
- Arguments:
(mixed $query, int $product_id)
qcw_entry_list_perpage / qcw_competition_entry_list_perpage
Section titled “qcw_entry_list_perpage / qcw_competition_entry_list_perpage”Filters items displayed per page in the entry list table.
- Arguments:
(int $per_page)
qcw_entry_list_row_class / qcw_entry_list_column_date / qcw_entry_list_column_default
Section titled “qcw_entry_list_row_class / qcw_entry_list_column_date / qcw_entry_list_column_default”Filters table row CSS classes, date formatting, and cell content in the entry table.
- Arguments:
(mixed $value, object $item)
qcw_winners
Section titled “qcw_winners”Filters the retrieved list of winners for a competition.
- Arguments:
(array $winners, int $product_id)
qcw_history_per_page / qcw_history_heading
Section titled “qcw_history_per_page / qcw_history_heading”Filters pagination and headings on competition history views.
qcw_competition_history / qcw_competition_history_data / qcw_competition_history_total
Section titled “qcw_competition_history / qcw_competition_history_data / qcw_competition_history_total”Filters participant history records and calculated totals.
qcw_competition_history_started_text / qcw_competition_history_starting_text
Section titled “qcw_competition_history_started_text / qcw_competition_history_starting_text”Filters status label text used in history tables.
qcw_top_buyers_limit
Section titled “qcw_top_buyers_limit”Filters the maximum number of top customers displayed in the Top Buyers metabox (default: 10).
- Arguments:
(int $limit, int $product_id)
5. UI, Badges & Display
Section titled “5. UI, Badges & Display”qcw_bage
Section titled “qcw_bage”Filters whether the main competition badge is displayed on product cards.
- Arguments:
(bool $show, WC_Product $product)
qcw_competition_status_badge
Section titled “qcw_competition_status_badge”Filters the HTML markup and label for status badges (Live, Closed, Future).
- Arguments:
(string $badge_html, string $status, int $product_id)
qcw_time_text
Section titled “qcw_time_text”Filters the formatted countdown timer text (e.g. days, hours, minutes remaining).
- Arguments:
(string $text, int $seconds_left)
qcw_free_postal_entry_content
Section titled “qcw_free_postal_entry_content”Filters the HTML content rendered inside the Free Postal Entry tab.
- Arguments:
(string $content, int $product_id)
qcw_default_catalog_orderby
Section titled “qcw_default_catalog_orderby”Filters the default sorting parameter for competition archives.
- Arguments:
(string $orderby)
qcw_shortcode_competitions_query
Section titled “qcw_shortcode_competitions_query”Filters the WP_Query arguments for [competitions] shortcodes.
- Arguments:
(array $query_args, array $atts)
qcw_live_draw_template
Section titled “qcw_live_draw_template”Filters the template file path for the live draw wheel screen.
- Arguments:
(string $template_path)
qcw_get_competition_search_form
Section titled “qcw_get_competition_search_form”Filters the HTML output of the competition search form widget.
- Arguments:
(string $form_html)
6. Admin Settings, Stream & Cache
Section titled “6. Admin Settings, Stream & Cache”qcw_get_settings_sections
Section titled “qcw_get_settings_sections”Filters the array of sections/tabs in the plugin settings dashboard.
- Arguments:
(array $sections)
add_filter( 'qcw_get_settings_sections', function( $sections ) { $sections['my_addon'] = __( 'My Addon', 'textdomain' ); return $sections;} );qcw_get_settings_fields
Section titled “qcw_get_settings_fields”Filters the array of form fields for a specific settings section.
- Arguments:
(array $fields, string $section)
qcw_show_support_page
Section titled “qcw_show_support_page”Filters whether the Support admin page is accessible.
- Arguments:
(bool $show)
qcw_stream_overlay_server_url
Section titled “qcw_stream_overlay_server_url”Filters the server endpoint URL for the OBS Stream Overlay (defaults to https://wpgenie.org).
- Arguments:
(string $url)
qcw_stream_overlay_sslverify
Section titled “qcw_stream_overlay_sslverify”Filters whether SSL verification is enforced on stream overlay API requests.
- Arguments:
(bool $verify)
qcw_enable_transient_cache
Section titled “qcw_enable_transient_cache”Filters whether transient caching is active for heavy ticket queries (default: true).
- Arguments:
(bool $enabled, string $transient_key)
qcw_automatic_relist_heading / qcw_competition_automatic_relist_check_time
Section titled “qcw_automatic_relist_heading / qcw_competition_automatic_relist_check_time”Filters heading labels and cron check intervals for automatic relisting.
qcw_competition_relist_from_time / qcw_competition_relist_to_time
Section titled “qcw_competition_relist_from_time / qcw_competition_relist_to_time”Filters default start and end times applied during automated relisting.
qcw_competition_export_dir_path / qcw_competition_export_filename / qcw_competition_export_fields
Section titled “qcw_competition_export_dir_path / qcw_competition_export_filename / qcw_competition_export_fields”Filters server storage paths, filenames, and exported column headers for CSV participant exports.