Changeset 3116324
- Timestamp:
- 07/11/2024 10:59:04 AM (21 months ago)
- Location:
- payhere-payment-gateway/trunk
- Files:
-
- 3 edited
-
gateway/class-wcgatewaypayhere.php (modified) (4 diffs)
-
payhere-payment-gateway.php (modified) (3 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
payhere-payment-gateway/trunk/gateway/class-wcgatewaypayhere.php
r3111559 r3116324 192 192 add_action('woocommerce_thankyou', array(&$this, 'remove_order_from_thankyou'), 10, 1); 193 193 194 add_filter('woocommerce_thankyou_order_received_text', array($this, 'change_woo_order_received_text'), 10, 2); 194 195 } 195 196 … … 219 220 public function generate_image_selection_html($key, $data) 220 221 { 221 return $this->gateway_utilities->generate_image_selection_html($key, $data);222 return $this->gateway_utilities->generate_image_selection_html($key, $data); 222 223 } 223 224 … … 714 715 715 716 $order_id = sanitize_text_field(wp_unslash($_order_id)); 716 717 717 718 if (empty($order_id)) { 718 719 $this->gateway_utilities->payhere_log('PAYHERE_RESPONSE', 'Order id Not Found after sanitize'); … … 894 895 exit(); 895 896 } 897 898 /** 899 * Modify the WooCommerce order received page title for payment peding orders 900 * 901 * @param array $title Current title. 902 * @param int $id WC Order id. 903 * @return Array retuns the apprpriate title for the order status. 904 */ 905 public function change_woo_order_received_text($title, $order) 906 { 907 if (is_order_received_page()) { 908 global $wp; 909 910 // There will be no nounce when the request is send. 911 // phpcs:ignore 912 $key = empty($_GET['key']) ? '' : wc_clean($_GET['key']); 913 914 $order_id = apply_filters('woocommerce_thankyou_order_id', absint($wp->query_vars['order-received'])); 915 $order_key = apply_filters('woocommerce_thankyou_order_key', $key); 916 917 918 if ($order_id > 0) { 919 $order = wc_get_order($order_id); 920 if ($order->get_order_key() !== $order_key) { 921 $order = false; 922 } 923 } 924 925 if (isset($order) && $order->get_payment_method() === $this->id) { 926 927 if (($order->get_status() === 'pending')) { 928 $title = 'Payment was not completed. Please try your purchase again.'; 929 } 930 } 931 } 932 933 return $title; 934 } 896 935 } -
payhere-payment-gateway/trunk/payhere-payment-gateway.php
r3111559 r3116324 8 8 * Plugin URI: https://www.payhere.lk 9 9 * 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. 410 * Version: 2.3.5 11 11 * Author: PayHere (Private) Limited 12 12 * Author URI: https://www.payhere.lk … … 26 26 * Start at version 2.0.0 and use SemVer - https://semver.org 27 27 */ 28 define('PAYHERE_VERSION', '2.3. 4');28 define('PAYHERE_VERSION', '2.3.5'); 29 29 /** 30 30 * Currently plugin text domain. … … 58 58 /** 59 59 * Add function to remove old transaction logs. 60 * This will remove in 2.3. 4update.60 * This will remove in 2.3.5 update. 61 61 */ 62 62 function payhere_check_upgrade() -
payhere-payment-gateway/trunk/readme.txt
r3111559 r3116324 3 3 Donate link: https://www.payhere.lk 4 4 Tags: payhere, online, payments, sri lanka 5 Requires at least: 6.4 .05 Requires at least: 6.4 6 6 Tested up to: 6.5.5 7 7 WC tested up to: 9.0.0 8 Stable tag: 2.3. 48 Stable tag: 2.3.5 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 160 160 = 2.3.4 = 161 161 Enabled support for changing the gateway icon, resolved the issues with WordPress Blocks, and fixed the gateway viewing issue. 162 163 = 2.3.5 = 164 Fixed the issue with the text message when redirecting to the order-received page while the payment is pending. 162 165 163 166 == Upgrade Notice ==
Note: See TracChangeset
for help on using the changeset viewer.