This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Save the current language in post_meta when checkout is processed (used to identify correct Email language) | |
add_action('woocommerce_checkout_update_order_meta', 'dartrax_save_language_on_checkout', 10, 2 ); | |
function dartrax_save_language_on_checkout( $order_id, $posted ) { | |
if( ! class_exists('TRP_Translate_Press') ) return ''; | |
global $TRP_LANGUAGE; | |
update_post_meta( $order_id, 'order_language', $TRP_LANGUAGE ); | |
} | |
// Woocommerce Shipment Mails | |
add_action( 'woocommerce_order_status_processing_to_cancelled_notification','dartrax_prepare_locale_for_Mail_with_order_id', 5, 1 ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Save the current language in post_meta when checkout is processed (used to identify correct Email language) | |
add_action('woocommerce_checkout_update_order_meta', 'dartrax_save_language_on_checkout', 10, 2 ); | |
function dartrax_save_language_on_checkout( $order_id, $posted ) { | |
if( ! class_exists('TRP_Translate_Press') ) return ''; | |
global $TRP_LANGUAGE; | |
update_post_meta( $order_id, 'order_language', $TRP_LANGUAGE ); | |
} | |
// Woocommerce Germanized Mails | |
add_action( 'woocommerce_gzd_shipment_status_draft_to_shipped_notification', 'dartrax_prepare_locale_for_Mail_with_shipment_id', 5, 1 ); |