Success text showing only on processing orders
This commit is contained in:
@@ -4,7 +4,7 @@ Tags: woocommerce, payment, paypal, gateway
|
|||||||
Requires at least: 5.8
|
Requires at least: 5.8
|
||||||
Tested up to: 6.3
|
Tested up to: 6.3
|
||||||
Requires PHP: 7.4
|
Requires PHP: 7.4
|
||||||
Stable tag: 1.0.0
|
Stable tag: 1.1.0
|
||||||
License: GPLv2 or later
|
License: GPLv2 or later
|
||||||
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
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 ==
|
== Changelog ==
|
||||||
|
|
||||||
|
= 1.1.0 =
|
||||||
|
* Added Text for Success and Failed orders
|
||||||
|
*
|
||||||
|
|
||||||
= 1.0.0 =
|
= 1.0.0 =
|
||||||
* Initial release
|
* Initial release
|
||||||
* Basic payment gateway functionality
|
* Basic payment gateway functionality
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
* Plugin Name: AluxPay Payment Gateway
|
* Plugin Name: AluxPay Payment Gateway
|
||||||
* Plugin URI: https://affordableluxurybags.is
|
* Plugin URI: https://affordableluxurybags.is
|
||||||
* Description: AluxPay payment gateway that redirects to standalone payment website with PayPal integration
|
* Description: AluxPay payment gateway that redirects to standalone payment website with PayPal integration
|
||||||
* Version: 1.0.0
|
* Version: 1.1.0
|
||||||
* Author: ALUXB
|
* Author: ALUXB
|
||||||
* Author URI: https://affordableluxurybags.is
|
* Author URI: https://affordableluxurybags.is
|
||||||
* Text Domain: aluxpay-payment-gateway
|
* Text Domain: aluxpay-payment-gateway
|
||||||
@@ -26,7 +26,7 @@ add_action('before_woocommerce_init', function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Define plugin constants
|
// 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_DIR', plugin_dir_path(__FILE__));
|
||||||
define('CPG_PLUGIN_URL', plugin_dir_url(__FILE__));
|
define('CPG_PLUGIN_URL', plugin_dir_url(__FILE__));
|
||||||
|
|
||||||
|
|||||||
@@ -14,8 +14,6 @@ class WC_Aluxpay_Payment_Gateway extends WC_Payment_Gateway {
|
|||||||
*/
|
*/
|
||||||
protected function get_generic_notice_html(): string {
|
protected function get_generic_notice_html(): string {
|
||||||
// Keep inline styles for email clients; translate strings
|
// 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 .= '<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, 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' ) . '</p>';
|
$html .= '<p>' . 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' ) . '</p>';
|
||||||
@@ -38,8 +36,6 @@ class WC_Aluxpay_Payment_Gateway extends WC_Payment_Gateway {
|
|||||||
*/
|
*/
|
||||||
protected function get_generic_notice_plain(): string {
|
protected function get_generic_notice_plain(): string {
|
||||||
$lines = array(
|
$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' ),
|
__( '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' ),
|
__( "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' ),
|
__( '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;
|
if ( $order->get_payment_method() !== $this->id ) return;
|
||||||
|
|
||||||
// Only show for completed/processing orders
|
// 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
|
// Pick the right format for the email renderer
|
||||||
if ( $plain_text ) {
|
if ( $plain_text ) {
|
||||||
|
|||||||
Reference in New Issue
Block a user