Skip to content

Instantly share code, notes, and snippets.

@Crocoblock
Last active May 26, 2025 07:03
Show Gist options
  • Select an option

  • Save Crocoblock/0927be75f728256de28f0b7e5416e6cb to your computer and use it in GitHub Desktop.

Select an option

Save Crocoblock/0927be75f728256de28f0b7e5416e6cb to your computer and use it in GitHub Desktop.
JetAppointment Redirect to custom page on appointment cancel
<?php
add_filter( 'jet-apb/public-actions/custom-action-page-content', 'jet_apb_custom_cancel_redirect', 10, 2 );
add_filter( 'jet-apb/public-actions/custom-action-page-content', 'jet_apb_custom_confirm_redirect', 10, 2 );
function jet_apb_custom_cancel_redirect( $custom, $action ) {
$type = $action->get_action();
if ( $type === 'cancel' ) {
wp_redirect( 'https://YOUR-CANCEL-URL-HERE.COM' );
exit;
}
return $custom;
}
function jet_apb_custom_confirm_redirect( $custom, $action ) {
$type = $action->get_action();
if ( $type === 'confirm' ) {
wp_redirect( 'https://YOUR-CONFIRM-URL-HERE.COM' );
exit;
}
return $custom;
}
@morosmo
Copy link

morosmo commented May 26, 2025

@Crocoblock How can we get appointment meta like "_confirm_url" and "_cancel_url" using php?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment