Add "Branded only" status report

This commit is contained in:
Narek Zakarian 2025-07-17 17:39:52 +04:00
parent efed7b793a
commit 86696e91b5
No known key found for this signature in database
GPG key ID: 07AFD7E7A9C164A7

View file

@ -15,6 +15,7 @@ use WooCommerce\PayPalCommerce\ApiClient\Helper\ReferenceTransactionStatus;
use WooCommerce\PayPalCommerce\ApiClient\Helper\DccApplies;
use WooCommerce\PayPalCommerce\Button\Helper\MessagesApply;
use WooCommerce\PayPalCommerce\Compat\PPEC\PPECHelper;
use WooCommerce\PayPalCommerce\Settings\Data\GeneralSettings;
use WooCommerce\PayPalCommerce\Settings\SettingsModule;
use WooCommerce\PayPalCommerce\Vendor\Inpsyde\Modularity\Module\ExecutableModule;
use WooCommerce\PayPalCommerce\Vendor\Inpsyde\Modularity\Module\ExtendingModule;
@ -86,6 +87,9 @@ class StatusReportModule implements ServiceModule, ExtendingModule, ExecutableMo
$subscription_mode_options = $c->get( 'wcgateway.settings.fields.subscriptions_mode_options' );
/* @var GeneralSettings $general_settings General plugin settings. */
$general_settings = $c->get( 'settings.data.general' );
// Feature flag convention.
// phpcs:disable WordPress.NamingConventions.ValidHookName.UseUnderscores
$items = array(
@ -97,6 +101,12 @@ class StatusReportModule implements ServiceModule, ExtendingModule, ExecutableMo
$this->onboarded( $bearer, $is_connected )
),
),
array(
'label' => esc_html__( 'Branded only', 'woocommerce-paypal-payments' ),
'exported_label' => 'Branded only',
'description' => esc_html__( 'Whether the plugin is in Branded only mode or not.', 'woocommerce-paypal-payments' ),
'value' => $this->bool_to_html( $general_settings->own_brand_only() ),
),
array(
'label' => esc_html__( 'New UI active', 'woocommerce-paypal-payments' ),
'exported_label' => 'New UI active',