Merge pull request #30123 from woocommerce/add/24641

Introduces a new hook after an email is sent
This commit is contained in:
Néstor Soriano 2021-06-24 09:15:18 +02:00 committed by GitHub
commit 21f7f97079
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 0 deletions

View File

@ -658,6 +658,16 @@ class WC_Email extends WC_Settings_API {
remove_filter( 'wp_mail_from_name', array( $this, 'get_from_name' ) ); remove_filter( 'wp_mail_from_name', array( $this, 'get_from_name' ) );
remove_filter( 'wp_mail_content_type', array( $this, 'get_content_type' ) ); remove_filter( 'wp_mail_content_type', array( $this, 'get_content_type' ) );
/**
* Action hook fired when an email is sent.
*
* @since 5.6.0
* @param bool $return Whether the email was sent successfully.
* @param int $id Email ID.
* @param WC_Email $this WC_Email instance.
*/
do_action( 'woocommerce_email_sent', $return, $this->id, $this );
return $return; return $return;
} }