Last active
May 26, 2025 07:03
-
-
Save Crocoblock/0927be75f728256de28f0b7e5416e6cb to your computer and use it in GitHub Desktop.
JetAppointment Redirect to custom page on appointment cancel
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?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; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@Crocoblock How can we get appointment meta like "_confirm_url" and "_cancel_url" using php?