This file contains 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 | |
function wc_removing_customer_details_in_emails($order, $sent_to_admin, $plain_text, $email) { | |
if ($order->has_shipping_method('wc_pickup_store')) { | |
$mailer = WC()->mailer(); | |
remove_action( 'woocommerce_email_customer_details', array( $mailer, 'email_addresses' ), 20, 3 ); | |
} | |
} | |
add_action('woocommerce_email_customer_details', 'wc_removing_customer_details_in_emails', 5, 4); |