• Resolved Norm Sash

    (@normsash)


    I’m calling kint d() function from within a class but I can’t get any output into the kint console. This is similar to what I have.

    
    add_action( 'wp_loaded', 'viewClassVar');
    function veiwClassVar(){
      $obj = new classVar;
      $obj->dumpVar;
      d( $obj);
    }
    
    class classVar {
      public function dumpVar() {
        $test = "this is a test";
        d( $test);
      }
    }
    

    The action d( $obj) works fine, but d( $test) from within the class method doesn’t show anything. Is there a way to be able to see dumps executed from within a class?

    Thanks,
    -Norm

Viewing 1 replies (of 1 total)
  • Thread Starter Norm Sash

    (@normsash)

    Opps, never mind ??

    There was a logic error in my code that was causing the behavior, so it actually works to dump vars from inside a class.

    Case closed.

Viewing 1 replies (of 1 total)
  • The topic ‘How to view dumps when called within a class?’ is closed to new replies.