Last active
February 2, 2018 11:41
-
-
Save smartdeal/a308c5843de7b187524c7d71df69082b to your computer and use it in GitHub Desktop.
[WooCommerce - send custom email on custom order status change] #WooCommerce #Wordpress
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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