mirror of
https://gh.wpcy.net/https://github.com/mainwp/Code-Snippets-Functions.git
synced 2026-04-29 11:32:21 +08:00
https://stackoverflow.com/questions/65049518/remove-order-details-from-woocommerce-processing-order-email-notification/65050318
7 lines
409 B
Text
7 lines
409 B
Text
add_action( 'woocommerce_email_order_details', 'action_email_order_details', 2, 4 );
|
|
function action_email_order_details( $order, $sent_to_admin, $plain_text, $email ) {
|
|
// Targeting "processing" order email notification sent to customer.
|
|
if ( 'customer_processing_order' === $email->id ) {
|
|
remove_action( 'woocommerce_email_order_details', array( WC()->mailer(), 'order_details' ) );
|
|
}
|
|
}
|