diff --git a/assets/js/blocks.js b/assets/js/blocks.js index 194cec7..6eac867 100644 --- a/assets/js/blocks.js +++ b/assets/js/blocks.js @@ -18,7 +18,7 @@ return window.wp.element.createElement( 'div', null, - window.breezSettings?.description || 'Pay with Lightning.' + window.breezSettings?.description || '.' ); }; diff --git a/breez-woocommerce.php b/breez-woocommerce.php index eaf74ff..1351222 100755 --- a/breez-woocommerce.php +++ b/breez-woocommerce.php @@ -1,10 +1,10 @@ [ - 'title' => !empty($settings['title']) ? $settings['title'] : 'Breez Nodeless Payments', - 'description' => !empty($settings['description']) ? $settings['description'] : 'Pay with Lightning', + 'title' => !empty($settings['title']) ? $settings['title'] : 'Pay with Lightning', + 'description' => !empty($settings['description']) ? $settings['description'] : '', 'supports' => ['products'], 'showSavedCards' => false, 'canMakePayment' => true, diff --git a/class-wc-gateway-breez.php b/class-wc-gateway-breez.php index 7a92d6a..15fe8e1 100644 --- a/class-wc-gateway-breez.php +++ b/class-wc-gateway-breez.php @@ -57,7 +57,7 @@ class WC_Gateway_Breez extends WC_Payment_Gateway { $this->icon = apply_filters('woocommerce_breez_icon', ''); $this->has_fields = false; $this->method_title = __('Lightning Payments', 'breez-woocommerce'); - $this->method_description = __('Pay with Lightning', 'breez-woocommerce'); + $this->method_description = __('', 'breez-woocommerce'); $this->supports = array( 'products', 'refunds' diff --git a/includes/admin/breez-settings.php b/includes/admin/breez-settings.php index 639d752..d1d44cf 100644 --- a/includes/admin/breez-settings.php +++ b/includes/admin/breez-settings.php @@ -20,14 +20,14 @@ return array( 'title' => __('Title', 'breez-woocommerce'), 'type' => 'text', 'description' => __('This controls the title which the user sees during checkout.', 'breez-woocommerce'), - 'default' => __('Lightning Payments', 'breez-woocommerce'), + 'default' => __('Pay with Lightning', 'breez-woocommerce'), 'desc_tip' => true, ), 'description' => array( 'title' => __('Description', 'breez-woocommerce'), 'type' => 'textarea', 'description' => __('This controls the description which the user sees during checkout.', 'breez-woocommerce'), - 'default' => __('Pay with Lightning', 'breez-woocommerce'), + 'default' => __('', 'breez-woocommerce'), 'desc_tip' => true, ), 'instructions' => array( diff --git a/includes/block/breez-payment.js b/includes/block/breez-payment.js index 329f62b..9e0856a 100644 --- a/includes/block/breez-payment.js +++ b/includes/block/breez-payment.js @@ -9,12 +9,12 @@ const { PaymentMethodLabel, PaymentMethodIcon } = window.wc.blocksComponents || const BreezLabel = () => { return createElement('div', { className: 'wc-block-components-payment-method-label' }, - createElement('span', {}, window.wcSettings?.breez?.title || 'Breez Nodeless Payments') + createElement('span', {}, window.wcSettings?.breez?.title || '') ); }; const BreezComponent = () => { - const description = window.wcSettings?.breez?.description || 'Pay with Lightning'; + const description = window.wcSettings?.breez?.description || ''; return createElement('div', { className: 'wc-block-components-payment-method-description' }, decodeEntities(description) ); diff --git a/includes/class-breez-blocks-support.php b/includes/class-breez-blocks-support.php index cb9a8cd..24dfe28 100644 --- a/includes/class-breez-blocks-support.php +++ b/includes/class-breez-blocks-support.php @@ -136,8 +136,8 @@ class Breez_Blocks_Support extends Automattic\WooCommerce\Blocks\Payments\Integr */ public function get_payment_method_data() { $data = [ - 'title' => !empty($this->settings['title']) ? $this->settings['title'] : 'Breez Nodeless Payments', - 'description' => !empty($this->settings['description']) ? $this->settings['description'] : 'Pay with Lightning', + 'title' => !empty($this->settings['title']) ? $this->settings['title'] : 'Pay with Lightning', + 'description' => !empty($this->settings['description']) ? $this->settings['description'] : '', 'supports' => ['products'], 'showSavedCards' => false, 'canMakePayment' => true, diff --git a/tests/framework/class-breez-unit-test-case.php b/tests/framework/class-breez-unit-test-case.php index 74ffc84..bf0278e 100644 --- a/tests/framework/class-breez-unit-test-case.php +++ b/tests/framework/class-breez-unit-test-case.php @@ -37,7 +37,7 @@ class Breez_Unit_Test_Case extends WP_UnitTestCase { update_option('woocommerce_breez_settings', [ 'enabled' => 'yes', 'title' => 'Breez Nodeless Payments', - 'description' => 'Pay with Lightning', + 'description' => '', 'api_url' => 'https://api.test.breez.com', 'api_key' => 'test_api_key', 'webhook_secret' => 'test_webhook_secret',