Raffle for WooCommerce 1.1.19 has 30 actions and 31 filters, read directly from its source code on Nov 18, 2026. The list updates automatically when a new version is released.
How to use these hooks
Actions let you run your own code at a specific moment. Filters let you change a value before the plugin uses it. Put your code in a child theme's functions.php or a code-snippets plugin, never in the plugin's own files, because updates overwrite them.
// Run your own code when Raffle for WooCommerce fires an action
add_action( 'rfwc_winner_selected', function( $ticket, $raffle_id ) {
// Your code runs here.
}, 10, 2 );
// Change a value Raffle for WooCommerce is about to use
add_filter( 'rfwc_display_instant_winners', function( $display_instant, $product, $instant_winners ) {
// Change $display_instant here.
return $display_instant;
}, 10, 3 );Parts of a name in {braces} are filled in at runtime (for example a post type or field ID). Choose Example on any hook for a ready-to-edit snippet.
All hooks
-
/** * Triggers winner notification email. */ do_action( 'rfwc_winner_selected', $ticket, $raffle_id ); -
/** * Filter whether to display the instant winners section on the product page. */ apply_filters( 'rfwc_display_instant_winners', $display_instant, $product, $instant_winners ); -
/** * Triggers admin notification when a raffle draw fails. */ do_action( 'rfwc_draw_failed', $raffle_id, $result->get_error_message(), $result->get_error_code() ); -
/** * Fires after a raffle's main draw completes and status is set to completed. */ do_action( 'rfwc_raffle_completed', $raffle_id, $winners ); -
/** * Filter the ticket format options on the product edit screen. */ apply_filters( 'rfwc_ticket_format_options', $ticket_format_options ); -
/** * Fires at the end of the Raffle Data product panel. */ do_action( 'rfwc_admin_product_options', $product ); -
/** * Filter extra tabs displayed on the Raffle Tickets admin page. */ apply_filters( 'rfwc_admin_tickets_extra_tabs', array(), $current_view ); -
/** * Render a custom Raffle Tickets admin view registered via * `rfwc_admin_tickets_extra_tabs`. */ apply_filters( 'rfwc_admin_tickets_render_view', false, $current_view ); -
/** * Fires after the default actions in each My Account ticket row. */ do_action( 'rfwc_after_ticket_display', $ticket ); -
/** * Filter whether analytics revenue includes tax. */ apply_filters( 'rfwc_analytics_revenue_include_tax', true ); -
/** * Filter to handle store credit awarding. */ apply_filters( 'rfwc_award_store_credit', false, $credit_amount, $winner_email, $user_id, $ticket, $raffle ); -
/** * Filters additional CSS classes on the instant win badge. */ apply_filters( 'rfwc_badge_class', '' ); -
/** * Filters additional CSS classes on the countdown wrapper. */ apply_filters( 'rfwc_countdown_wrapper_class', '' ); -
/** * Filter the pool of tickets eligible for a draw. */ apply_filters( 'rfwc_eligible_tickets', $tickets, $raffle_id ); -
/** * Filters whether customers can print their own raffle tickets. */ apply_filters( 'rfwc_enable_customer_ticket_print', 'yes' === get_option( 'rfwc_enable_customer_ticket_print', 'yes' ) ); -
/** * Filters whether a feature module is enabled. */ apply_filters( 'rfwc_feature_enabled', get_option( $feature, $default ) === 'yes', $feature ); -
/** * Fires after the free entry form, so add-ons can add more ways to record * entries. */ do_action( 'rfwc_free_entries_after_form', $raffles ); -
/** * Fires after a free entry is recorded. */ do_action( 'rfwc_free_entry_recorded', $order->get_id(), $args ); -
/** * Fires after core frontend scripts and styles are enqueued. */ do_action( 'rfwc_frontend_scripts' ); -
/** * Filter the generated ticket number. */ apply_filters( 'rfwc_generate_ticket_number', null, $raffle_id, $product, $format ); -
/** * Triggers gift received email to recipient. */ do_action( 'rfwc_gift_tickets_generated', $order->get_id(), $recipient_tickets, $raffle_id, $recipient_email ); -
/** * Allow addons to override or extend the evaluation with additional modes. */ apply_filters( 'rfwc_instant_win_evaluate', null, $ticket, $product, $mode ); -
/** * Fires after an instant win evaluation is complete. */ do_action( 'rfwc_instant_win_evaluated', $ticket, $is_winner, $mode, $product ); -
/** * Filter the prize tier for an instant winner. */ apply_filters( 'rfwc_instant_win_prize_tier', $prize_tier, $ticket, $product ); -
/** * Filter the ticket status after an instant win. */ apply_filters( 'rfwc_instant_win_ticket_status', 'winner', $ticket, $product ); -
/** * Fires after an instant winner is created. */ do_action( 'rfwc_instant_winner_created', $winner, $ticket, $product, $order ); -
/** * Fires after all core classes are instantiated. */ do_action( 'rfwc_loaded', $this ); -
/** * Fires after all mass refund orders have been processed. */ do_action( 'rfwc_mass_refund_completed', $raffle_id, $summary ); -
/** * Filters the maximum number of prize tiers (winners with individual prize * config). */ apply_filters( 'rfwc_max_prize_tiers', 20 ); -
/** * Fires after tickets are generated for an order. */ do_action( 'rfwc_order_tickets_generated', $order_id, $generated_tickets ); -
/** * Fires after a prize coupon is created. */ do_action( 'rfwc_prize_coupon_created', $coupon, $ticket, $raffle ); -
/** * Fires after a prize order is created. */ do_action( 'rfwc_prize_order_created', $order, $ticket, $raffle ); -
/** * Fires after core raffle product meta is processed but before save. */ do_action( 'rfwc_process_product_meta', $post_id, $product ); -
/** * Filter the raffle product data tabs. */ apply_filters( 'rfwc_product_tabs', $tabs ); -
/** * Filter whether the automatic per-raffle draw should run. */ apply_filters( 'rfwc_should_auto_draw', true, $raffle_id ); -
/** * Filter whether core should fulfill the prize for this winner. */ apply_filters( 'rfwc_should_fulfill_prize', true, $ticket, $raffle ); -
/** * Fires after a ticket is cancelled. */ do_action( 'rfwc_ticket_cancelled', $ticket, $order_id ); -
/** * Fires after a ticket is generated. */ do_action( 'rfwc_ticket_generated', $ticket, $order, $is_gift ); -
/** * Triggers ticket refunded email to holder. */ do_action( 'rfwc_ticket_refunded', $email, $tickets, $raffle_id, array( 'refund_amount' => $refund_amount, 'refund_reason' => $reason, 'order_id' => $order_id, ) ); -
/** * Triggers ticket confirmation email to purchaser. */ do_action( 'rfwc_tickets_generated', $order->get_id(), $ticket_groups['non_gift'], $raffle_id ); -
/** * Filter the sold ticket count for a raffle. */ apply_filters( 'rfwc_tickets_sold_count', absint( $count ), $this->get_id() ); -
/** * Filters the prize name shown in the winner notification email. */ apply_filters( 'rfwc_winner_email_prize_name', $prize_name, $ticket, $this->raffle ); -
/** * Filters the prize value shown in the winner notification email. */ apply_filters( 'rfwc_winner_email_prize_value', $prize_value, $ticket, $this->raffle ); -
do_action( 'woocommerce_email_header', $email_heading, $email ); -
apply_filters( 'rfwc_mask_winner_name', false, null ); -
do_action( 'rfwc_prize_claimed', $ticket, $winner->get_raffle_id() ); -
do_action( 'rfwc_resend_winner_notification', $ticket, $winner->get_raffle_id() ); -
apply_filters( 'rfwc_get_sections', $sections ); -
apply_filters( "rfwc_get_settings_{$section}", $settings ); -
apply_filters( 'rfwc_instant_win_ribbon_text', __( 'Instant Win', 'raffle-for-woocommerce' ) ); -
apply_filters( 'rfwc_show_winner_city', true ); -
apply_filters( 'rfwc_show_winner_details', true, $product ); -
apply_filters( 'rfwc_ticket_primary_color', $primary_color ); -
apply_filters( 'woocommerce_add_to_cart_form_action', $product->get_permalink() ); -
do_action( 'woocommerce_after_add_to_cart_button' ); -
do_action( 'woocommerce_after_add_to_cart_form' ); -
do_action( 'woocommerce_after_add_to_cart_quantity' ); -
do_action( 'woocommerce_before_add_to_cart_form' ); -
do_action( 'woocommerce_before_add_to_cart_quantity' ); -
apply_filters( 'woocommerce_return_to_shop_redirect', wc_get_page_permalink( 'shop' ) );
Generated from Raffle for WooCommerce's GPL-licensed source code. Hooks inside bundled third-party libraries are not listed.
Done for you
Rather have it built for you?
Tell us what should change and we’ll write and test the code using these hooks.
Custom hook snippet
from $49
A small, update-safe change built on the plugin’s own hooks.
- Code written against the plugin’s actions and filters
- Tested on a staging copy of your site
- Install instructions included
Typical turnaround: 2–3 business days
Choose thisPlugin customisation
from $149
New features or changed behaviour, without editing the plugin’s files.
- Built as a companion plugin, so updates never wipe it
- Exact quote before we start
- Tested on staging, then deployed
Typical turnaround: 3–7 business days
Choose thisNot sure which fits? Describe what you need and we’ll suggest the simplest option.
Can't find the right hook?
We can build the customisation for you. Describe what you need: