From 9d5869d1da0d86a0a9c31c76d6b2bae451e4f03a Mon Sep 17 00:00:00 2001 From: Panagiotis Papadopoulos Date: Tue, 13 Feb 2024 11:34:34 +0100 Subject: [PATCH] fix(tutor_permission_denied_template): call die() instead of return to correctly end execution of code --- includes/tutor-template-functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/tutor-template-functions.php b/includes/tutor-template-functions.php index 67b4dce712..332082b7ae 100644 --- a/includes/tutor-template-functions.php +++ b/includes/tutor-template-functions.php @@ -1583,7 +1583,7 @@ function tutor_enrolled_course_progress() { /** * Load permission denied template * - * It will load permission denied template & return so not code + * It will load permission denied template & die so no code * after this will execute * * @since 2.2.0 @@ -1608,6 +1608,6 @@ function tutor_permission_denied_template( int $post_id = 0 ) { ); tutor_load_template( 'permission-denied', $args ); - return; + die(); } } \ No newline at end of file