I'm trying to add custom content after the order table on the Woocommerce "Processing Order" and "Order Completed" customer emails, using the following code.
It should only be added if the customer chose "Local Pickup" as the shipping method.
function local_pickup_extra_content_email($order, $is_admin_email) {
if ( $is_admin_email ) {
return;
}
if ( ICL_LANGUAGE_CODE == "he" && strpos( $order->get_shipping_method(), 'Local Pickup' ) !== false) {
echo '<p><strong>Note:</strong> Please wait for telephone confirmation of local pickup.</p>';
}
}
add_action( 'woocommerce_email_after_order_table', 'local_pickup_extra_content_email', 10, 2 );
The content isn't being added to the emails specified. It's only being added to the "Order Details/Invoice" email that's sent manually through the Woocommerce order admin page.
How can I add the above content to the emails mentioned? What am I doing wrong?
(The email templates aren't overridden in the theme folder)