SEND4_VERSION, 'wp_version' => (string) get_bloginfo( 'version' ), 'php_version' => self::php_version(), 'wc_version' => self::woocommerce_version(), 'locale' => (string) get_locale(), 'multisite' => is_multisite(), ); } /** * PHP's own release number, without whatever the distribution appended. * * PHP_VERSION on a Debian or Ubuntu build reads like * "8.3.14-1+ubuntu22.04.1+deb.sury.org+1", which is longer than the 32 * characters Send4 keeps, so it would arrive as nothing at all. * * @return string */ private static function php_version() { return PHP_MAJOR_VERSION . '.' . PHP_MINOR_VERSION . '.' . PHP_RELEASE_VERSION; } /** * WooCommerce's version when it is loaded here, else null. * * @return string|null */ private static function woocommerce_version() { if ( ! defined( 'WC_VERSION' ) ) { return null; } $version = constant( 'WC_VERSION' ); return is_string( $version ) && '' !== $version ? $version : null; } }