- payment : first date error corrected

- payment : added httpErrorException
- payment : error handling wip
- profil page restriction gives access to admin and editor
This commit is contained in:
asus
2024-03-07 10:26:11 +01:00
parent 2fb1ec35aa
commit b8fbd84d53
7 changed files with 59 additions and 18 deletions

View File

@@ -0,0 +1,30 @@
<?php
/*
* it means someone outside wp is accessing the file, in this case kill it.
*/
if (!defined('ABSPATH')) {
die('You can not access this file!');
}
// Define a custom exception class for HTTP errors
class HttpErrorException extends Exception {
// HTTP status code
private $statusCode;
public function __construct($message, $statusCode) {
parent::__construct($message);
$this->statusCode = $statusCode;
}
public function getStatusCode() {
return $this->statusCode;
}
}
?>