WordPress action hook
wpml_add_language_form_field
Fired by 6 WordPress plugins, running on 213K+ sites between them.
How to use wpml_add_language_form_field
It's an action: your callback runs at that point. Nothing needs to be returned.
Add this to your theme's functions.php or a small custom plugin:
add_action( 'wpml_add_language_form_field', function() {
// Your code runs here.
}, 10, 1 );Argument names come from WPML Multilingual & Multicurrency for WooCommerce's source. Other plugins may pass different values: check the call in the plugin you're targeting below.
6 plugins that fire wpml_add_language_form_field
Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.
-
WPML Multilingual & Multicurrency for WooCommerce100,000+ installs
do_action( 'wpml_add_language_form_field' )inc/class-wcml-ajax-setup.php:22 -
Germanized for WooCommerce70,000+ installs
do_action( 'wpml_add_language_form_field' )includes/compatibility/class-wc-gzd-compatibility-wpml.php:547 -
YITH WooCommerce Ajax Search30,000+ installs
do_action( 'wpml_add_language_form_field' )templates/yith-woocommerce-ajax-search.php:24 -
Registrations for the Events Calendar7,000+ installs
do_action( 'wpml_add_language_form_field' )includes/form/class-rtec-form.php:880 -
EU Order Withdrawal Button for WooCommerce6,000+ installs
do_action( 'wpml_add_language_form_field' )src/Compatibility/WPML.php:48 -
EU Consumer Rights for WooCommerce200+ installs
do_action( 'wpml_add_language_form_field' )withdrawal/src/Compatibility/WPML.php:48
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.