diff --git a/modules/ppcp-axo/extensions.php b/modules/ppcp-axo/extensions.php index 76e307d8b..260d226ad 100644 --- a/modules/ppcp-axo/extensions.php +++ b/modules/ppcp-axo/extensions.php @@ -83,7 +83,6 @@ return array( ->rule() ->condition_element( 'axo_enabled', '1' ) ->action_visible( 'axo_main_notice' ) - ->action_visible( 'axo_privacy' ) ->action_visible( 'axo_style_heading' ) ->action_class( 'axo_enabled', 'active' ) ->to_array(), @@ -131,22 +130,6 @@ return array( 'requirements' => array( 'dcc', 'axo' ), 'gateway' => array( 'dcc', 'axo' ), ), - 'axo_privacy' => array( - 'title' => __( 'Privacy', 'woocommerce-paypal-payments' ), - 'type' => 'select', - 'description' => __( - 'PayPal powers this accelerated checkout solution from Fastlane. Since you\'ll share consumers\' email address with PayPal, please consult your legal advisors on the appropriate privacy setting for your business.', - 'woocommerce-paypal-payments' - ), - 'classes' => array( 'ppcp-field-indent' ), - 'class' => array(), - 'input_class' => array( 'wc-enhanced-select' ), - 'default' => 'yes', - 'options' => PropertiesDictionary::privacy_options(), - 'screens' => array( State::STATE_ONBOARDED ), - 'gateway' => array( 'dcc', 'axo' ), - 'requirements' => array( 'axo' ), - ), 'axo_style_heading' => array( 'heading' => __( 'Advanced Style Settings (optional)', 'woocommerce-paypal-payments' ), 'heading_html' => sprintf( diff --git a/modules/ppcp-axo/src/Helper/PropertiesDictionary.php b/modules/ppcp-axo/src/Helper/PropertiesDictionary.php index a07c4ace3..2b8659bd8 100644 --- a/modules/ppcp-axo/src/Helper/PropertiesDictionary.php +++ b/modules/ppcp-axo/src/Helper/PropertiesDictionary.php @@ -14,18 +14,6 @@ namespace WooCommerce\PayPalCommerce\Axo\Helper; */ class PropertiesDictionary { - /** - * Returns the list of possible privacy options. - * - * @return array - */ - public static function privacy_options(): array { - return array( - 'yes' => __( 'Yes (Recommended)', 'woocommerce-paypal-payments' ), - 'no' => __( 'No', 'woocommerce-paypal-payments' ), - ); - } - /** * Returns the list of possible cardholder name options. * diff --git a/modules/ppcp-wc-gateway/src/Helper/DCCGatewayConfiguration.php b/modules/ppcp-wc-gateway/src/Helper/DCCGatewayConfiguration.php index 7534f5d34..b028fa068 100644 --- a/modules/ppcp-wc-gateway/src/Helper/DCCGatewayConfiguration.php +++ b/modules/ppcp-wc-gateway/src/Helper/DCCGatewayConfiguration.php @@ -34,6 +34,14 @@ class DCCGatewayConfiguration { */ private string $show_name_on_card; + /** + * Whether the Fastlane watermark should be hidden on the front-end. + * + * @var bool + */ + private bool $hide_fastlane_watermark = false; + + /** * Initializes the gateway details based on the provided Settings instance. * @@ -57,6 +65,16 @@ class DCCGatewayConfiguration { $this->show_name_on_card = in_array( $show_on_card, $valid_options, true ) ? $show_on_card : $valid_options[0]; + + /** + * Moved from setting "axo_privacy" to a hook-only filter: + * Changing this to true (and hiding the watermark) has potential legal + * consequences, and therefore is generally discouraged. + */ + $this->hide_fastlane_watermark = add_filter( + 'woocommerce_paypal_payments_fastlane_watermark_enabled', + '__return_false' + ); } /** @@ -76,4 +94,16 @@ class DCCGatewayConfiguration { public function show_name_on_card() : string { return $this->show_name_on_card; } + + /** + * Whether to display the watermark (text branding) for the Fastlane payment + * method in the front end. + * + * Note: This setting is planned but not implemented yet. + * + * @retun bool True means, the default watermark is displayed to customers. + */ + public function show_fastlane_watermark() : bool { + return ! $this->hide_fastlane_watermark; + } }