Skip to content

Instantly share code, notes, and snippets.

@smartdeal
Last active February 2, 2018 11:41
Show Gist options
  • Save smartdeal/a308c5843de7b187524c7d71df69082b to your computer and use it in GitHub Desktop.
Save smartdeal/a308c5843de7b187524c7d71df69082b to your computer and use it in GitHub Desktop.
[WooCommerce - send custom email on custom order status change] #WooCommerce #Wordpress
<?php
// WooCommerce - send custom email on custom order status change
In WC 2.2+ I believe you can do this via the following:
add_action( 'woocommerce_order_status_wc-order-confirmed', array( WC(), 'send_transactional_email' ), 10, 10 );
// As of WooCommerce 2.3
function so_27112461_woocommerce_email_actions( $actions ){
$actions[] = 'woocommerce_order_status_wc-order-confirmed';
return $actions;
}
add_filter( 'woocommerce_email_actions', 'so_27112461_woocommerce_email_actions' );
// https://stackoverflow.com/questions/27112461/woocommerce-send-custom-email-on-custom-order-status-change
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment