WordPress action hook
wpml_switch_language_for_email
Fired by 15 WordPress plugins, running on 57K+ sites between them.
“Switch language for email”
How to use wpml_switch_language_for_email
It's an action: your callback runs at that point and receives 1 argument. Nothing needs to be returned.
Add this to your theme's functions.php or a small custom plugin:
add_action( 'wpml_switch_language_for_email', function( $arg1 ) {
// Your code runs here.
}, 10, 1 );Argument names come from WCFM Marketplace's source. Other plugins may pass different values: check the call in the plugin you're targeting below.
15 plugins that fire wpml_switch_language_for_email
Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.
-
WCFM10,000+ installs
do_action( 'wpml_switch_language_for_email', $mail_to )controllers/customers/wcfm-controller-customers-manage.php:190 -
WCFM Membership10,000+ installs
do_action( 'wpml_switch_language_for_email', $member_user->user_email )core/class-wcfmvm-ajax.php:474 -
UsersWP10,000+ installs
do_action( 'wpml_switch_language_for_email', $to )includes/class-emails.php:566 -
WCFM Marketplace10,000+ installs
do_action( 'wpml_switch_language_for_email', $this->get_recipient() )includes/store-emails/class-wcfmmp-email-store-new-order.php:120 -
Sensei LMS9,000+ installs
do_action( 'wpml_switch_language_for_email', $email_address )includes/wpml/class-email.php:53 -
Waitlist Woocommerce ( Back in stock notifier )4,000+ installs
do_action( 'wpml_switch_language_for_email', $email )includes/emails/class-xoo-wl-email.php:149 -
MyRewards2,000+ installs
do_action( 'wpml_switch_language_for_email', $email )assets/lws-adminpanel/include/internal/mailer.php:98 -
Order Approval for Woocommerce1,000+ installs
do_action( 'wpml_switch_language_for_email', $this->get_recipient() )includes/class-wcfm-order-approval-vendor-order.php:125 -
MarketKing700+ installs
do_action( 'wpml_switch_language_for_email', $email_address )public/emails/class-marketking-new-announcement-email.php:46 -
ELEX WordPress HelpDesk & Customer Ticketing System200+ installs
do_action( 'wpml_switch_language_for_email', $to )includes/class-crm-ajax-functions.php:1200 -
CommonsBooking200+ installs
do_action( 'wpml_switch_language_for_email', $recipientUser->getEmail() )src/Messages/Message.php:204 -
ELEX WooCommerce Abandoned Cart Recovery with Dynamic Coupons100+ installs
do_action( 'wpml_switch_language_for_email', $toEmail )includes/class_elex_email_cron_action.php:85 -
Ultimate Classified Listings30+ installs
do_action( 'wpml_switch_language_for_email', $new_agent['useremail'] )classes/class-email.php:58 -
Enwikuna License Manager for WooCommerce20+ installs
do_action( 'wpml_switch_language_for_email', $this->get_recipient() )includes/woocommerce/emails/class-elm-wc-license-expired-email.php:98 -
Circular Arts NetworkFewer than 10 installs
do_action( 'wpml_switch_language_for_email', $new_agent['useremail'] )classes/class-email.php:55
Need a customisation built on this hook?
Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.