• Resolved kajava

    (@kajava)


    I am trying to use the wpbc_set_booking_approved action inside my active theme’s function.php. For example when writing this inside functions.php does not change the booking with that ID:

    do_action('wpbc_set_booking_approved', array("booking_id" => 16), array("after_action_result" => true));

    I am using the free version of the plugin, is it only available on the paid versions?

Viewing 1 replies (of 1 total)
  • Plugin Author wpdevelop

    (@wpdevelop)

    Hello.
    1) It is only the hook for the actions that appear in the Booking Listing page, there is no action for this hook.
    2) To approve the booking, please use this:
    Approve booking:
    $action_result = wpbc_booking_do_action__set_booking_approved_or_pending( $booking_id , array( 'user_id' => $user_id, 'reason_of_action' => $reason_of_action, 'is_approve' => '1' ) );
    Set booking as pending:
    $action_result = wpbc_booking_do_action__set_booking_approved_or_pending( $booking_id , array( 'user_id' => $user_id, 'reason_of_action' => $reason_of_action, 'is_approve' => '0' ) );

    where
    $booking_id – it is ID of the booking
    $reason_of_action – some text. Can be empty string: ”.
    $user_id – ID of the user. For example: $user_id = get_current_user_id();

    Kind Regards.

    Kind Regards.

Viewing 1 replies (of 1 total)

The topic ‘wpbc_set_booking_approved action not working’ is closed to new replies.