• The new CF7 v4.8 release changes the way form tags are passed to validation functions. Previously,

    add_filter('wpcf7_validate_text', 'my_custom_text_validation', 10,2);
    function my_custom_text_validation($result, $tag){
      //tag was passed as an array in pre v4.8.
      $tag = new WPCF7_FormTag( $tag );
      $field_name = $tag->name;
      ...
      return $result;
    }

    in the new version,

    add_filter('wpcf7_validate_text', 'my_custom_text_validation', 10,2);
    function my_custom_text_validation($result, $tag){
      //tag is now passed as an object in v4.8.
      $field_name = $tag->name;
      ...
      return $result;
    }

    I don’t understand why the plugin author simply didn’t create a new function. This has broken one of my plugins already! A waste of debugging time if you ask me.

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘WARNING: CF7 v4.8 may break many extension plugins’ is closed to new replies.