Last active
January 29, 2020 06:35
-
-
Save KeylorCR/78863304644a609a77ed27c11d86398e to your computer and use it in GitHub Desktop.
Remove woocommerce email addresses on wc_pickup_store shipping method
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); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment