Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter guiver01

    (@guiver01)

    I had created an issue on Github. (https://github.com/hCaptcha/hcaptcha-wordpress-plugin/issues/199)

    Thanks you for your time ??

    • This reply was modified 2 years, 1 month ago by guiver01.
    Thread Starter guiver01

    (@guiver01)

    Hello,

    Yes I tried some triks : var_dump() and echo ‘<script>console.log(“test function”)</script>’; (for write a message on the Firefox console).

    The function that I am testing is exactly the same that the FAQ page :

    function my_hcap_activate( $activate ) {
      $url = isset( $_SERVER['REQUEST_URI'] ) ?
      filter_var( wp_unslash( $_SERVER['REQUEST_URI'] ), FILTER_SANITIZE_FULL_SPECIAL_CHARS ) :
      '';
    
      if ( '/my-account/' === $url ) {
      return false;
      }
    
      return $activate;
    }
    add_filter( 'hcap_activate', 'my_hcap_activate' );

    But I tried just :

    function my_hcap_activate( $activate ) {
        var_dump($activate);
        echo '<script>console.log("test function")</script>';
    }
    add_filter( 'hcap_activate', 'my_hcap_activate' );

    And I haven’t the var_dump or the message console.

    For the other function that I am using :

    function my_hcap_delay_api( $delay ) {
      return 0;
    }
    add_filter( 'hcap_delay_api', 'my_hcap_delay_api' );

    When I added the dump and the console message, I saw them.

    I hope that you could understand my English ??

Viewing 2 replies - 1 through 2 (of 2 total)