自动化WooCommerce订单电子邮件以及运输标签到仓库



我想知道(以前从未使用过Woocommerce(关于WC订单流的一些事情。

我正在考虑管理Woocommerce和Wordpress所在的网站的后端,并希望找到一种方法,通过电子邮件将订单自动化到位于另一个位置的仓库/运输部门。

我真的不希望他们访问后端,因为他们不了解它/从未使用过它。

理想情况下,还希望包括要与订单电子邮件通知一起发送的(加拿大邮政(运输标签。

(订单进入WooCommerce>电子邮件被发送到仓库进行处理/发货(

我有没有办法做到这一点?

要在处理订单电子邮件通知时向仓库/运输部门发送密件抄送 (BCC( 电子邮件,您将使用此自定义挂钩函数:

// Add a custom hidden email to processing email notification
add_filter( 'woocommerce_email_headers', 'warehouse_shipping_email_notification', 20, 3 );
function warehouse_shipping_email_notification( $header, $email_id, $order ) {
// Only for customer processing order notification
if( 'customer_processing_order' != $email_id ) return $header;
// HERE below set the warehouse/shipping name and email address
$name = 'Macfilish Warehouse Shipping';
$email = 'shipping@macfilish.com';
// Add warehouse email to BCC
$header .= 'Bcc: ' . utf8_decode($name . ' <' . $email . '>') . "rn";
return $header;
}

代码进入函数.php活动子主题(或活动主题(的文件。经过测试并工作。

由于我从未使用过Woocommerce加拿大邮政扩展名,因此我无法为您提供任何帮助以包含运输标签...

最新更新