HEX
Server: nginx/1.27.0
System: Linux 20d173156d2c 6.8.0-88-generic #89-Ubuntu SMP PREEMPT_DYNAMIC Sat Oct 11 01:02:46 UTC 2025 x86_64
User: www-data (33)
PHP: 8.1.29
Disabled: NONE
Upload Files
File: /var/www/html/wp-content/plugins/woocommerce-gateway-stripe/includes/class-wc-stripe-mode.php
<?php
if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

/**
 * Class WC_Stripe_Mode
 */
class WC_Stripe_Mode {
	/**
	 * Checks if the plugin is in live mode.
	 *
	 * @return bool Whether the plugin is in live mode.
	 */
	public static function is_live() {
		$settings = WC_Stripe_Helper::get_stripe_settings();
		return 'yes' !== ( $settings['testmode'] ?? 'no' );
	}

	/**
	 * Checks if the plugin is in test mode.
	 *
	 * @return bool Whether the plugin is in test mode.
	 */
	public static function is_test() {
		$settings = WC_Stripe_Helper::get_stripe_settings();
		return 'yes' === ( $settings['testmode'] ?? 'no' );
	}
}