Plugin Directory

Changeset 3123742


Ignore:
Timestamp:
07/23/2024 09:43:48 AM (21 months ago)
Author:
payhere
Message:

Fixed the issue of the pay button duplication.

Location:
payhere-payment-gateway
Files:
132 added
3 edited

Legend:

Unmodified
Added
Removed
  • payhere-payment-gateway/trunk/gateway/class-wcgatewaypayhere.php

    r3116324 r3123742  
    129129
    130130    /**
     131     * Static variable to count the number of instances of PayHere Class
     132     *
     133     * @since 2.3.6
     134     * @access private
     135     * @var integer
     136     */
     137    private static $ph_instance_count = 0;
     138
     139    /**
     140     * Instance ID for tracking multiple instances of the PayHere Class.
     141     *
     142     * @since 2.3.6
     143     * @access private
     144     * @var integer
     145     */
     146    private $ph_instance_id;
     147
     148    /**
    131149     * Constructor for WC gateway main class.
    132150     * from the consreuctor set config from the saved settings.
     
    145163        $this->init_form_fields();
    146164        $this->init_settings();
     165
     166        self::$ph_instance_count++;
     167        $this->ph_instance_id = self::$ph_instance_count;
    147168
    148169        /**
     
    187208
    188209        add_action('woocommerce_update_options_payment_gateways_' . $this->id, array(&$this, 'process_admin_options'));
    189         add_action('woocommerce_receipt_payhere', array(&$this, 'receipt_page'));
     210
     211        if (1 === $this->ph_instance_id) {
     212            add_action('woocommerce_receipt_payhere', array(&$this, 'receipt_page'));
     213        }
     214
    190215        add_filter('the_title', array(&$this, 'order_received_title'), 10, 2);
    191216
  • payhere-payment-gateway/trunk/payhere-payment-gateway.php

    r3116324 r3123742  
    88 * Plugin URI:        https://www.payhere.lk
    99 * Description:       PayHere Payment Gateway allows you to accept payment on your Woocommerce store via Visa, MasterCard, AMEX, eZcash, mCash & Internet banking services.
    10  * Version:           2.3.5
     10 * Version:           2.3.6
    1111 * Author:            PayHere (Private) Limited
    1212 * Author URI:        https://www.payhere.lk
     
    2626 * Start at version 2.0.0 and use SemVer - https://semver.org
    2727 */
    28 define('PAYHERE_VERSION', '2.3.5');
     28define('PAYHERE_VERSION', '2.3.6');
    2929/**
    3030 * Currently plugin text domain.
  • payhere-payment-gateway/trunk/readme.txt

    r3116324 r3123742  
    66Tested up to: 6.5.5
    77WC tested up to: 9.0.0
    8 Stable tag: 2.3.5
     8Stable tag: 2.3.6
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    163163= 2.3.5 =
    164164Fixed the issue with the text message when redirecting to the order-received page while the payment is pending.
     165
     166= 2.3.6 =
     167Fixed the issue of the pay button duplication.
    165168
    166169== Upgrade Notice ==
Note: See TracChangeset for help on using the changeset viewer.