Home Forums Community Forum [Woocommerce Builder Checkout Form] Checkout Field Editor Compatibility Issue

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • DarkAllMan
    Participant
    Post count: 57

    I use “Checkout Field Editor for WooCommerce” plugin.
    I can create custom conditional checkout fields. When a required field is hidden, no validation is needed.
    This works with the default avada checkout form, but in the Woocommerce Builder, a hidden field is still required on submit. I have opened a ticket with themehigh, but maybe someone else with the same plugin can confirm this behaviour.

    8vasa8
    Participant
    Post count: 13

    Hello,

    I was afraid od comapatiblity so I didn’t update yet. Can you please let me know what support will tell you?

    Thanks

    DarkAllMan
    Participant
    Post count: 57

    I will try to update this thread.

    DarkAllMan
    Participant
    Post count: 57

    I did some testing:

    When using the default Avada checkout page (the one created with the shortcode), only the visible form elements are posted for validation/submit.
    When I use the Fusion Builder created checkout page, all the form elements, including hidden form elements, are submitted for validation/submit.

    So it seems it’s on the Avada side of things….. Avada should only post visible form elements, not hidden.

    DarkAllMan
    Participant
    Post count: 57

    Nevermind, in both instances all fields are posted.

    8vasa8
    Participant
    Post count: 13

    Did themehigh said something about this to you? Did you contact avada team too?

    DarkAllMan
    Participant
    Post count: 57

    I did not open a ticket with Avada, as I have no active support at the moment.
    I did contact Themehigh and they are investigating. I’m awaiting their findings/answer.

    DarkAllMan
    Participant
    Post count: 57

    @8vasa8,
    Themehigh provided me with a workaround specific to my case. 2 functions in my theme function file that fixed the issue.

    add_filter( 'thwcfe_disabled_fields', 'th12345_disabled_fields',999);
    function th12345_disabled_fields($dis_hooks){
       $value = th34e_get_custom_field_value('checkbox_field');
       if($value == 1) {
           $dis_hooks = array();
       } else {
           $dis_hooks = array('required_field1,required_field2');
       }
       return $dis_hooks;
    }
    
    function th34e_get_custom_field_value($key) {
         $value = isset($_POST[$key]) ? stripslashes($_POST[$key]) : '';
     if(!$value){
           $post_data = isset($_POST['post_data']) ? $_POST['post_data'] : '';
       if($post_data){
           parse_str($post_data, $post_data_arr);
           $value = isset($post_data_arr[$key]) ? stripslashes($post_data_arr[$key]) : '';
       }
     }
       return $value;
    }
    
    8vasa8
    Participant
    Post count: 13

    Thanks. Will they relase some fix in new update? Did say something about that?

    DarkAllMan
    Participant
    Post count: 57

    This is their fix.
    They could not tell me if it was Avada or another plugin that creates the issue.
    But to make sure, I have to add the above code.

    I do not think there will be a code update for a next release. They did not mention it.

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.