From a92b8021f696c40b2dae9f3489ed47d65684e4e6 Mon Sep 17 00:00:00 2001 From: matej Date: Sun, 12 Oct 2025 01:33:20 +0200 Subject: [PATCH] Success text showing only on processing orders --- aluxpay-payment-gateway/README.txt | 6 +++++- aluxpay-payment-gateway/aluxpay-payment-gateway.php | 4 ++-- .../includes/class-aluxpay-payment-gateway.php | 6 +----- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/aluxpay-payment-gateway/README.txt b/aluxpay-payment-gateway/README.txt index 732d943..cf579cf 100644 --- a/aluxpay-payment-gateway/README.txt +++ b/aluxpay-payment-gateway/README.txt @@ -4,7 +4,7 @@ Tags: woocommerce, payment, paypal, gateway Requires at least: 5.8 Tested up to: 6.3 Requires PHP: 7.4 -Stable tag: 1.0.0 +Stable tag: 1.1.0 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html @@ -103,6 +103,10 @@ The plugin automatically handles returns from your payment website. Your payment == Changelog == += 1.1.0 = +* Added Text for Success and Failed orders +* + = 1.0.0 = * Initial release * Basic payment gateway functionality diff --git a/aluxpay-payment-gateway/aluxpay-payment-gateway.php b/aluxpay-payment-gateway/aluxpay-payment-gateway.php index 420800c..03000ba 100644 --- a/aluxpay-payment-gateway/aluxpay-payment-gateway.php +++ b/aluxpay-payment-gateway/aluxpay-payment-gateway.php @@ -3,7 +3,7 @@ * Plugin Name: AluxPay Payment Gateway * Plugin URI: https://affordableluxurybags.is * Description: AluxPay payment gateway that redirects to standalone payment website with PayPal integration - * Version: 1.0.0 + * Version: 1.1.0 * Author: ALUXB * Author URI: https://affordableluxurybags.is * Text Domain: aluxpay-payment-gateway @@ -26,7 +26,7 @@ add_action('before_woocommerce_init', function() { }); // Define plugin constants -define('CPG_VERSION', '1.0.0'); +define('CPG_VERSION', '1.1.0'); define('CPG_PLUGIN_DIR', plugin_dir_path(__FILE__)); define('CPG_PLUGIN_URL', plugin_dir_url(__FILE__)); diff --git a/aluxpay-payment-gateway/includes/class-aluxpay-payment-gateway.php b/aluxpay-payment-gateway/includes/class-aluxpay-payment-gateway.php index cc607b7..f24e8a3 100644 --- a/aluxpay-payment-gateway/includes/class-aluxpay-payment-gateway.php +++ b/aluxpay-payment-gateway/includes/class-aluxpay-payment-gateway.php @@ -14,8 +14,6 @@ class WC_Aluxpay_Payment_Gateway extends WC_Payment_Gateway { */ protected function get_generic_notice_html(): string { // Keep inline styles for email clients; translate strings - $html .= '

' . esc_html__( 'Thank you for your payment!', 'aluxpay-payment-gateway' ) . ' '; - $html .= esc_html__( 'Your order has been successfully processed, and a confirmation email has been sent from our webstore.', 'aluxpay-payment-gateway' ) . '

'; $html .= '
' . esc_html__( 'Important Note:', 'aluxpay-payment-gateway' ) . '
'; $html .= '

' . esc_html__( "Because of the nature of our business and how our website integrates with PayPal, you’ll also receive a PayPal payment confirmation email. That email will display a generic product name instead of the specific item(s) you purchased.", 'aluxpay-payment-gateway' ) . '

'; @@ -38,8 +36,6 @@ class WC_Aluxpay_Payment_Gateway extends WC_Payment_Gateway { */ protected function get_generic_notice_plain(): string { $lines = array( - __( 'Thank you for your payment! Your order has been successfully processed, and a confirmation email has been sent from our webstore.', 'aluxpay-payment-gateway' ), - '', __( 'Important Note:', 'aluxpay-payment-gateway' ), __( "Because of the nature of our business and how our website integrates with PayPal, you’ll also receive a PayPal payment confirmation email. That email will display a generic product name instead of the specific item(s) you purchased.", 'aluxpay-payment-gateway' ), __( 'Rest assured — your order is fully confirmed, and the webstore confirmation email contains the correct details of your purchase.', 'aluxpay-payment-gateway' ), @@ -359,7 +355,7 @@ class WC_Aluxpay_Payment_Gateway extends WC_Payment_Gateway { if ( $order->get_payment_method() !== $this->id ) return; // Only show for completed/processing orders - if ( ! in_array( $order->get_status(), array( 'processing', 'completed' ) ) ) return; + if ( ! in_array( $order->get_status(), array( 'processing' ) ) ) return; // Pick the right format for the email renderer if ( $plain_text ) {