Raffle tickets are only generated for orders that have the status of Processing or Completed.
For On Hold orders the payment hasn’t been received, therefore no tickets will be generated.
Now, what happens if you want your customers to pay by Cheque?
For cheque payments, the orders will be set On Hold meaning no payment has been received yet, therefore no raffle tickets will be generated.
If you want to generate raffle tickets for Cheque payments you will need to change the order status from On Hold to Processing.
You can do it manually in the admin order page, or the best way is automatically after the order is created in Thank you page.
To change the order status for Cheque payments from On Hold to processing copy the following code and paste it in the functions.php of your Child Theme.
add_action( 'woocommerce_thankyou', 'cheque_payment_method_order_status_to_processing', 10, 1 );
function cheque_payment_method_order_status_to_processing( $order_id ) {
if ( ! $order_id )
return;
$order = wc_get_order( $order_id );
// Updating order status to processing for orders delivered with Cheque payment methods.
if ( $order->get_payment_method() === 'cheque' ) {
$order->update_status( 'processing' );
}
}