# charitable/1.8.12/includes/debugging/class-charitable-debugging.php

Charitable – Donation &amp; Fundraising Platform (Donation Forms, Recurring Donations &amp; Fundraising Campaigns), version 1.8.12. 59 lines.

- Page: https://pluginprobe.com/plugins/charitable/1.8.12/code/includes/debugging/class-charitable-debugging.php
- Raw: https://pluginprobe.com/plugins/charitable/1.8.12/raw/includes/debugging/class-charitable-debugging.php
- Modified: 2023-11-01T16:41:02+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/charitable/1.8.12/code/includes/debugging/class-charitable-debugging.php#L10-L20`.

```php
<?php
/**
 * Responsible for helping with debugging.
 *
 * @package   Charitable/Classes/Charitable_Debugging
 * @author    David Bisset
 * @copyright Copyright (c) 2023, WP Charitable LLC
 * @license   http://opensource.org/licenses/gpl-2.0.php GNU Public License
 * @since     1.6.42
 * @version   1.6.42
 */

// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

if ( ! class_exists( 'Charitable_Debugging' ) ) :

	/**
	 * Charitable_Debugging
	 *
	 * @since 1.6.42
	 */
	class Charitable_Debugging {

		/**
		 * Create class object.
		 *
		 * @since 1.6.42
		 */
		public function __construct() {
			/**
			 * Automatically add Charitable's debugging constants when
			 * using the WP Debugging plugin.
			 */
			add_filter( 'wp_debugging_add_constants', array( $this, 'add_debugging_constants' ) );
		}

		/**
		 * Add debugging constants.
		 *
		 * @since  1.6.42
		 *
		 * @param  array $added_constants Collection of added constants.
		 * @return array
		 */
		public function add_debugging_constants( $added_constants ) {
			return array_merge(
				$added_constants,
				array(
					'charitable_debug' => array( 'value' => 'true' )
				)
			);
		}
	}

endif;

```
