@hamami
You have the action hook in this file
.../plugins/ultimate-member/includes/core/um-actions-form.php line 778
/**
* UM hook
*
* @type action
* @title um_custom_field_validation_{$custom}
* @description Submit form validation for custom field
* @input_vars
* [{"var":"$key","type":"string","desc":"Field Key"},
* {"var":"$field","type":"array","desc":"Field Data"},
* {"var":"$args","type":"array","desc":"Form Arguments"}]
* @change_log
* ["Since: 2.0"]
* @usage add_action( 'um_custom_field_validation_{$custom}', 'function_name', 10, 3 );
* @example
* <?php
* add_action( 'um_custom_field_validation_{$custom}', 'my_custom_field_validation', 10, 3 );
* function my_custom_field_validation( $key, $field, $args ) {
* // your code here
* }
* ?>
*/
do_action( "um_custom_field_validation_{$custom}", $key, $array, $submitted_data );
Thread Starter
hamami
(@hamami)
Yes I saw that,
However, for some reason, the arguments don’t transfer to wp-includes/class-wp-hook.php, only the first one ($key)..
Could you try to reproduce it?
Thank you,
Itai
@hamami
It works OK for me with this coding
add_action( 'um_custom_field_validation_mobile_number', 'um_custom_validate_mobile_number', 30, 3 );
function um_custom_validate_mobile_number($key, $array, $submitted_data) {
// write parameters to log file
}
Thread Starter
hamami
(@hamami)
Oh I found the problem.. it was on my end, but your snippet helped me find the problem..
Thank you 🙂