Plugin Directory

Changeset 3447313


Ignore:
Timestamp:
01/26/2026 07:05:05 PM (2 months ago)
Author:
ipodguy79
Message:

update to 2.0.3

Location:
advanced-emt-payment-gateway/trunk
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • advanced-emt-payment-gateway/trunk/advanced-emt-payment-gateway.php

    r3436379 r3447313  
    55 * Plugin URI:  https://wordpress.org/plugins/advanced-emt-payment-gateway/
    66 * Description: Accept Interac e-Transfer / Email Money Transfer (EMT) in WooCommerce with dynamic secret answers, order notes, and customizable instructions. Supports Block and Classic checkout.
    7  * Version:     2.0.2
     7 * Version:     2.0.3
    88 * Author:      ipodguy79
    99 * Author URI:  https://profiles.wordpress.org/ipodguy79/
     
    220220    );
    221221});
     222add_action('wp_enqueue_scripts', function () {
     223    if (function_exists('is_order_received_page') && is_order_received_page()) {
     224        wp_enqueue_style(
     225            'advanced-emt-thankyou',
     226            plugins_url('assets/aemt.css', __FILE__),
     227            [],
     228            '2.0.3'
     229        );
     230    }
     231}, 20);
    222232
    223233add_action('before_woocommerce_init', function () {
     
    465475            $output = str_replace('[order]', $order->get_order_number(), $this->instructions);
    466476            $output = str_replace('[answer]', $answer, $output);
    467             echo wp_kses_post(wpautop(esc_html($output)));
    468         }
    469     }
    470 });
    471 
    472 add_action('woocommerce_order_details_after_order_table', function($order) {
    473     if (! $order instanceof WC_Order) return;
    474     if ($order->get_payment_method() !== 'advanced_emt') return;
    475 
    476     $settings = get_option('woocommerce_advanced_emt_settings');
    477     $instructions = isset($settings['instructions']) ? $settings['instructions'] : '';
    478     $answer = $order->get_meta('_emt_answer');
    479 
    480     $output = str_replace('[order]', $order->get_order_number(), $instructions);
    481     $output = str_replace('[answer]', $answer, $output);
    482 
    483     echo wp_kses_post('<section class="woocommerce-order-details">
    484         <h2>' . esc_html__('EMT Payment Instructions', 'advanced-emt-payment-gateway') . '</h2>
    485         <div class="woocommerce-order-details__emt-instructions" style="background:#eef8ff; padding:1em; margin-top:1em;">
    486             ' . wpautop(esc_html($output)) . '
    487         </div>
    488     </section>');
    489 });
     477            $body = wpautop(esc_html($output));
     478
     479            if ($is_thankyou) {
     480                // Thank-you page: wrap with unique classes so users can style it with CSS.
     481                echo wp_kses_post(
     482                    '<section class="aemt-instructions aemt-instructions--thankyou" role="note">' .
     483                        '<div class="aemt-instructions__body">' . $body . '</div>' .
     484                    '</section>'
     485                );
     486                return;
     487            }
     488
     489            // Emails (and anything else): keep original output behavior.
     490            echo wp_kses_post($body);
     491        }
     492    }
     493});
  • advanced-emt-payment-gateway/trunk/readme.txt

    r3436379 r3447313  
    77WC requires at least: 6.0
    88WC tested up to: 8.6
    9 Stable tag: 2.0.2
     9Stable tag: 2.0.3
    1010License: GPL2 or later
    1111License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    248248== Changelog ==
    249249
     250= 2.0.3 =
     251
     252Fix: Prevent EMT payment instructions from appearing twice on the Order Received page by removing duplicate output hook.
     253-Output EMT instructions above the Order Details table on the thank-you page.
     254-Add unique wrapper classes (.aemt-instructions, .aemt-instructions--thankyou, .aemt-instructions__body) to make styling easier.
     255-Remove inline styles from thank-you page instructions so themes/custom CSS can control appearance.
     256
     257= 2.0.2 =
     258free version was missing a exit :) im so far from perfect but im trying.
     259enjoy and thank you for the support
     260FREE 7 DAY TRIAL OF PRO IN ACCOUNT SEE SCREENSHOTS
     261
     262= 2.0.1 =
     263Pro: Adds optional IMAP inbox auto-confirmation.
     264Adds optional auto-match cents + [amount] placeholder.
     265
    250266= 1.1.3 =
    251267* New (Pro): Optional IMAP inbox watcher to auto-confirm EMT orders by matching deposit emails to the order's expected total.
     
    272288== Upgrade Notice ==
    273289
    274 = 2.0.1 =
    275 Pro: Adds optional IMAP inbox auto-confirmation.
    276 Adds optional auto-match cents + [amount] placeholder.
     290
    277291
    278292= 2.0.2 =
Note: See TracChangeset for help on using the changeset viewer.