Skip to content

Commit

Permalink
Fix "Fatal error: Uncaught Error: Undefined constant "PRONAMIC_PAY_DE…
Browse files Browse the repository at this point in the history
…BUG".
  • Loading branch information
rvdsteege committed Feb 3, 2023
1 parent 3a2a990 commit 10b7865
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Admin/AdminSettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public function admin_init() {
'type' => 'checkbox',
];

if ( \PRONAMIC_PAY_DEBUG ) {
if ( defined( '\PRONAMIC_PAY_DEBUG' ) && \PRONAMIC_PAY_DEBUG ) {
$debug_mode_args['value'] = true;
$debug_mode_args['disabled'] = \disabled( \PRONAMIC_PAY_DEBUG, true, false );
}
Expand Down
2 changes: 1 addition & 1 deletion src/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -1397,7 +1397,7 @@ public function payment_redirect_url( $url, Payment $payment ) {
public function is_debug_mode() {
$value = \get_option( 'pronamic_pay_debug_mode', false );

if ( PRONAMIC_PAY_DEBUG ) {
if ( defined( '\PRONAMIC_PAY_DEBUG' ) && PRONAMIC_PAY_DEBUG ) {
$value = true;
}

Expand Down

0 comments on commit 10b7865

Please sign in to comment.