Spidervalve100
Forum Replies Created
-
Forum: Plugins
In reply to: [WooCommerce] Stop Woocommerce from autofilling address fields from userTHANK YOU MIKE JOLLEY!!!
Im not sure I would have ever figured that out. I added the single line from your second link to the snippets plugin, and deleted my users billing info and shipping info. Works perfectly.
Forum: Plugins
In reply to: Stop Woocommerce from autofilling address fields from userSorry, Posted in the wrong place again. Opened the question up at:
Forum: Plugins
In reply to: [WooCommerce] add First and Last name from order to customer email recipientAs stated before, im no programmer, but I think I can get you in the right direction. For user signup the info is stored in wordpress users section, not woocommerce. So you need to get the info from there. This website should get you in the right direction
Forum: Plugins
In reply to: [WooCommerce] add First and Last name from order to customer email recipientOk, its not pretty, but I found out how to do this. Basically I added a second TO: line to the header that included the info I wanted. Since the second to line had the same info as the recipient plus the name, most email programs (including highrise, the crm, accepts that line not the original TO line. here is the code.
add_filter( ‘woocommerce_email_headers’, ‘mycustom_headers_filter_function’, 10, 3);
function mycustom_headers_filter_function($headers, $object, $order ) { $headers = array(); $headers[] = "TO: " . $order->billing_first_name . " " . $order->billing_last_name . " <" . $order->billing_email. ">" . "\r\n"; $headers[] = 'BCC: [email protected]'; $headers[] = 'Content-Type: text'; return $headers; }
Like I said, not pretty, but it works.
Forum: Plugins
In reply to: [WooCommerce] add First and Last name from order to customer email recipientusing the following works to add a new recipient
// Format Recipient add_filter( 'woocommerce_email_recipient_customer_note', 'your_email_recipient_filter_function', 10, 2); function your_email_recipient_filter_function($recipient, $object) { $recipient = $recipient . ', [email protected]'; return $recipient }
But this doesnt do anything.
// Format Recipient add_filter( 'woocommerce_email_recipient_customer_note', 'your_email_recipient_filter_function', 10, 2); function your_email_recipient_filter_function($recipient, $object) { $recipient = $recipient . ', My Name <[email protected]>'; return $recipient }
I found some info here which made me try the following
$billing_first_name = get_post_meta($wpo_wcpdf->export->order->id,'_billing_first_name',true); $billing_last_name = get_post_meta($wpo_wcpdf->export->order->id,'_billing_last_name',true); add_filter( 'woocommerce_email', 'mycustom_email_filter_function', 10, 2); function mycustom_email_filter_function($to, $object, $order_id) { $to = 'TO: ' . $billing_first_name . ' ' . $billing_Last_name . '<' . $recipient . '>'; return $to;
Still nothing. Im getting a little desperate here. Nothing I do seems to work. Any help would be SO SO appreciated.
Forum: Plugins
In reply to: [WooCommerce] add First and Last name from order to customer email recipientStill cannot get this to work properly. Does anyone know if it is even possible with wordpress to send out an email with this kind of format.
Forum: Hacks
In reply to: woocomerce add First and Last name to customer emailThank you for pointing me in the right direction, dont do the whole forum posting thing much.