This user has no favorite topics.
Favorite Forum Topics
Forum Topics Created
| Status |
Topic
|
Supporter | Voices | Posts | Freshness |
|---|---|---|---|---|---|
|
Elementor Form Validation Error on Translated Pages (WPML Conflict Suspected)
1
2
Started by: beco-treat-apsK
in: English Support
Problem: add_action( 'wp_ajax_elementor_pro_forms_send_form', 'wssupp_set_language_ajax_form', 9 );<br />add_action( 'wp_ajax_nopriv_elementor_pro_forms_send_form', 'wssupp_set_language_ajax_form', 9 );<br />function wssupp_set_language_ajax_form(){<br /> $id = $_POST['post_id'];<br /> $post = get_post($id);<br /> $lang = apply_filters( 'wpml_element_language_code', NULL, ['element_id' => $id, 'element_type' => $post->post_type] );<br /> $current_language = apply_filters('wpml_current_language', NULL );<br /> if ( $lang != $current_language ) {<br /> do_action( 'wpml_switch_language', $lang );<br /> }<br />}This code ensures that the AJAX request for the form submission is processed in the correct language context. Please note that this solution might be outdated or not applicable to your specific case. If the issue persists, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If necessary, please open a new support ticket at WPML support forum for further assistance. |
|
0 | 28 | 11 months, 1 week ago |