Remove 'email_addresses' action from 'woocommerce_email_customer_details' hook
<p>In WooCommerce, there is a public static class <code>WC_Emails</code>, defined in <code>/woocommerce/includes/class-wc-emails.php</code>.</p>

<p>Within that class, there is a reference to a hook called <code>woocommerce_email_customer_details</code>. To that hook, an action called <code>email_addresses</code> is assigned, which is simply a PHP file that generates some HTML for billing and shipping addresses to be added to email notifications.</p>

<pre><code>add_action( 'woocommerce_email_customer_details', array( $this, 'email_addresses' ), 20, 3 );
</code></pre>

<p>I am trying to remove that action and can't seem to figure out how to do it.</p>

<p>Here's an example bit of code in my child theme's <code>functions.php</code> that does not work:</p>

<pre><code>add_action( 'init', 'remove_default_addresses');
    function remove_default_addresses() {
    remove_action( 'woocommerce_email_customer_details', 
                   array( 'WC_Emails', 'email_addresses' ), 20);
}
</code></pre>

<p>Instead of the <code>init</code> hook there, I have tried <code>wp-head</code>.  Since <code>WC_Emails</code> is a static function, the above code is the way the WordPress Codex suggests, as far as using an <code>array()</code> above, instead of just the action name. Regardless, this doesn't work, either (with just the action name):</p>

<pre><code>add_action( 'init', 'remove_default_addresses');
function remove_default_addresses() {
    remove_action( 'woocommerce_email_customer_details', 'email_addresses', 20);
}
</code></pre>

<p><code>20</code> is the priority on the <code>add_action</code> Woo does, and I also understand that a <code>remove_action()</code> must have the same priority as what the original <code>add_action()</code> had.</p>

<p>No matter what I try, the billing and shipping addresses still appear on the email notifications.  </p>

<p>Once that gets working, it will be great! However, there is an additional requirement:  This needs to happen only inside code I have for the <code>woocommerce_order_status_pending_to_processing_notification</code> hook in Woo.</p>

<p>In other words, I have other code that fires and generates an email when an order status changes from Pending to Processing (and I have tried my code above with all its variations within that hook as well).  I need the billing and shipping addresses to NOT show only in the custom email that is generated.</p>

<p>Any ideas?  Thanks so much. :)</p>