Hi there,
well the template is not really disabled – we do only remove the hooks to make sure that this email is not being automatically sent after a new order is created.
Do you want to send 2 emails (processing and on-hold) after a new order is being created or what do you want to achieve?
Cheers
I want to sell course tickets over my webshop.
If a customer pays via paypal i only want to send one email. As far as i understood the legal requirements, its possible to have just one email. I have no need to review the order, so i automatically accept the contract and send the invoice if the payment was successful.
The second payment option is set up that only the admin account can use it. So if a customer want to pay via Bank Transfer or Cash, there is another form to fill out and checkbox to accept the terms and conditions.
I then just fill in the details in the webshop frontend and submit the order. The costumer will get the on-hold email with payment information and without an invoice. This way everything is automated (decrease stock, send confirmation & terms, ordernumber for check-in).
When the costumer pays via bank transfer i put the order on completed and the invoice gets created and sent. If the costumer pays cash i print an invoice with my cash register and the order never gets completed.
I already found a solution that works for me so far:
In class-wc-gzd-emails.php i comment out line 238 and 239:
if ( $this->get_email_instance_by_id( 'customer_on_hold_order' ) )
remove_action( 'woocommerce_order_status_pending_to_on-hold_notification', array( $this->get_email_instance_by_id( 'customer_on_hold_order' ), 'trigger' ) );
I do this directly in the plugin file, i couldn’t make it work to copy the file to my theme directory (+ appropriate subdirectory) and edit there, as i’m used from other plugins.
Greetings Andi
Hi there,
you cannot override classes in your child theme (templates only). You would need to manually add the hook after Germanized has already removed the hook e.g.:
add_action( 'woocommerce_email', 'my_child_gzd_email_hooks', 100, 1 );
function my_child_gzd_email_hooks( $mailer ) {
add_action( 'woocommerce_order_status_pending_to_on-hold_notification', array( $mailer->emails[ 'WC_Email_Customer_On_Hold_Order' ], 'trigger' ) );
}
That should reenable the hook..
Cheers