constants = $constants; } /** * Get the current platform */ public function get(): Platform { if ( ! $this->platform ) { /** * WooCommerce data * * @var array */ $woo = $this->constants->get_woocommerce_data(); /** * Environment data * * @var array */ $env = $this->constants->get_environment_data(); /** * Plugin data * * @var array */ $sq = $this->constants->get_plugin_data(); /** * Filter the module version to be used in the platform options. * * @since 3.0.0 */ $version = \apply_filters( 'sequra_platform_options_version', $sq['Version'] ?? '' ); $platform_version = ( $woo['Version'] ?? '' ) . ( isset( $env['wp_version'] ) ? " + WordPress {$env['wp_version']}" : '' ); /** * Filter the platform options. * * @since 3.0.0 */ $this->platform = \apply_filters( 'sequra_platform_options', new Platform( $this->constants->get_integration_name(), $platform_version, $env['uname'], $env['db_name'], $env['db_version'], $version, $env['php_version'] ) ); } return $this->platform; } }