• I need add an action that retrieves a parameter. I have this:

    add_action('dopbsp_reservation_approve_hilo', array(&$this->classes->backend_reservation, 'approve_hilo'), 1, 1);
    //add_action('wp_ajax_dopbsp_reservation_approve_hilo', array(&$this->classes->backend_reservation, 'approve_hilo'), 1, 1); tested to, same result
    do_action('dopbsp_reservation_approve_hilo',  $reservation_id); //I had confirmed that $reservation_id has the correct value

    And my function is declared this way:

    function approve_hilo($reservation_id){
    //my stuff goes here...
    }

    But approve_hilo function is never called. Do you know what is wrong?

    thanks you all in advance!

The topic ‘WordPress hooks with parameters function don't work’ is closed to new replies.