Success text showing only on processing orders

This commit is contained in:
2025-10-12 01:33:20 +02:00
parent b997e14fe6
commit a92b8021f6
3 changed files with 8 additions and 8 deletions

View File

@@ -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

View File

@@ -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__));

View File

@@ -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 .= '<p><strong>' . esc_html__( 'Thank you for your payment!', 'aluxpay-payment-gateway' ) . '</strong> ';
$html .= esc_html__( 'Your order has been successfully processed, and a confirmation email has been sent from our webstore.', 'aluxpay-payment-gateway' ) . '</p>';
$html .= '<h5>' . esc_html__( 'Important Note:', 'aluxpay-payment-gateway' ) . '</h5>';
$html .= '<p>' . esc_html__( "Because of the nature of our business and how our website integrates with PayPal, youll 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' ) . '</p>';
@@ -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, youll 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 ) {