Advertisement
lorro

WooCommerce - Manage customer email fields

Oct 26th, 2015
307
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.41 KB | None | 0 0
  1. <?php
  2.   // manage fields in customer email
  3.   // code goes in functions.php for your child theme
  4.   add_filter( 'woocommerce_email_customer_details_fields', 'my_function', 40, 3);
  5.   function my_function($fields, $sent_to_admin, $order ) {
  6.     if (!$sent_to_admin) {
  7.       $fields["billing_email"]["value"] = 'Redacted';
  8.       $fields["billing_phone"]["value"] = 'Redacted';
  9.     }
  10.     return $fields;
  11.   }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement