daily pastebin goal
51%
SHARE
TWEET

WooCommerce - Manage customer email fields

lorro Oct 26th, 2015 172 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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.   }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top