Tag Archives: email

Change locale for WooCommerce email

To change WooCommerce email language you need to change the locale after order submit. Using $_GET might be dirty, but works ­čÖé

Posted in Uncategorized, woocommerce, wordpress | Tagged , , , , | Leave a comment

WooCommerce email with custom total row

To add a custom total row to woocommerce email total section just hook into┬áwoocommerce_get_order_item_totals add_filter(‘woocommerce_get_order_item_totals’, ‘my_woocommerce_get_order_item_totals’, 10, 2); function my_woocommerce_get_order_item_totals($total_rows, $order) { $new_total_rows[‘cart_subtotal’] = $total_rows[‘cart_subtotal’]; $new_total_rows[‘shipping’] = array( ‘label’ => ‘Slovak Parcel Service:’, ‘value’ => wc_price(3), ); $gateway = wc_get_payment_gateway_by_order($order); … Continue reading

Posted in woocommerce | Tagged , | Leave a comment

Useful Postfix CLI commands to manage email queue

During dev I sometimes need to check what emails are scheduled to be sent. Display a list of queued mails sudo mailq View message in queue sudo postcat -vq QUEUE_ID Delete queued mail after debugging sudo postsuper -d ALL

Posted in postfix, Uncategorized | Tagged , , | Leave a comment

Customizing Monolog HTML formatter for email

Monolog can send emails when there’s an error, but in the provided HTML formatter I missed the REQUEST_URI and REMOTE_ADDR that triggered the error. Some info is in the exceptions section, but not always and needs horizontal scrolling in the … Continue reading

Posted in symfony, Uncategorized | Tagged , , , | 3 Comments