diff --git a/modules/ppcp-compat/src/PPEC/PPECHelper.php b/modules/ppcp-compat/src/PPEC/PPECHelper.php index ec1543b70..09fca3c19 100644 --- a/modules/ppcp-compat/src/PPEC/PPECHelper.php +++ b/modules/ppcp-compat/src/PPEC/PPECHelper.php @@ -29,6 +29,15 @@ class PPECHelper { const PPEC_SETTINGS_OPTION_NAME = 'woocommerce_ppec_paypal_settings'; + /** + * Checks if the PayPal Express Checkout plugin was configured previously. + * + * @return bool + */ + public static function is_plugin_configured() { + return is_array( get_option( self::PPEC_SETTINGS_OPTION_NAME ) ); + } + /** * Checks if the PayPal Express Checkout plugin is active. * diff --git a/modules/ppcp-status-report/src/StatusReportModule.php b/modules/ppcp-status-report/src/StatusReportModule.php index e00c842b2..20f54f7eb 100644 --- a/modules/ppcp-status-report/src/StatusReportModule.php +++ b/modules/ppcp-status-report/src/StatusReportModule.php @@ -19,6 +19,7 @@ use WooCommerce\PayPalCommerce\ApiClient\Exception\RuntimeException; use WooCommerce\PayPalCommerce\ApiClient\Helper\CurrencySupport; use WooCommerce\PayPalCommerce\ApiClient\Helper\DccApplies; use WooCommerce\PayPalCommerce\Button\Helper\MessagesApply; +use WooCommerce\PayPalCommerce\Compat\PPEC\PPECHelper; use WooCommerce\PayPalCommerce\Onboarding\State; /** @@ -66,6 +67,8 @@ class StatusReportModule implements ModuleInterface { /* @var Renderer $renderer The renderer. */ $renderer = $c->get( 'status-report.renderer' ); + $had_ppec_plugin = PPECHelper::is_plugin_configured(); + $items = array( array( 'label' => esc_html__( 'Onboarded', 'woocommerce-paypal-payments' ), @@ -114,6 +117,13 @@ class StatusReportModule implements ModuleInterface { $settings->has( 'logging_enabled' ) && $settings->get( 'logging_enabled' ) ), ), + array( + 'label' => esc_html__( 'Used PayPal Checkout plugin', 'woocommerce-paypal-payments' ), + 'description' => esc_html__( 'Whether the PayPal Checkout Gateway plugin was configured previously or not', 'woocommerce-paypal-payments' ), + 'value' => $this->bool_to_text( + $had_ppec_plugin + ), + ), ); echo wp_kses_post(