Create email message when is weight based shipping is on
-
Hello,
I have a site and I use the weight based shipping plugin. I have a shipping rule for local pickup in the plugin. I need a custom message in completion email when a customer use plugin’s local pickup.
For normal shipping option local pickup I use this function:
`add_action( ‘woocommerce_email_before_order_table’, ‘add_order_email_instructions’, 10, 2 );function add_order_email_instructions( $order, $sent_to_admin ) {
$shipping_method = @array_shift( $order->get_shipping_methods() );
$shipping_method_id = $shipping_method[‘method_id’];if ( ! $sent_to_admin ) {
if ( ‘local_pickup:5’ == $shipping_method_id ) {
// local pickup option
echo ‘<p>Custom Message</p>’;
}
}
}What I have to change?
Thanks a lot in advance.
- The topic ‘Create email message when is weight based shipping is on’ is closed to new replies.