Skip to content

Instantly share code, notes, and snippets.

@JeroenSormani
Last active January 26, 2018 12:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JeroenSormani/28cc2d3353868d31d18f to your computer and use it in GitHub Desktop.
Save JeroenSormani/28cc2d3353868d31d18f to your computer and use it in GitHub Desktop.
Trigger Receiptful mail directly after order, no matter the status (designed to send a email right after ordering with BACS gateway)
<?php
if ( function_exists( 'Receiptful' ) ) :
remove_action( 'woocommerce_order_status_on-hold_to_processing', array( Receiptful()->email, 'send_transactional_email' ) );
add_action( 'woocommerce_order_status_pending_to_on-hold', array( Receiptful()->email, 'send_transactional_email' ) );
endif;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment