Changeset 3250059
- Timestamp:
- 03/04/2025 05:25:13 AM (13 months ago)
- Location:
- pay-via-barion-for-woocommerce/trunk
- Files:
-
- 4 edited
-
includes/class-wc-gateway-barion-ipn-handler.php (modified) (2 diffs)
-
includes/class-wc-gateway-barion-request.php (modified) (1 diff)
-
index.php (modified) (4 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
pay-via-barion-for-woocommerce/trunk/includes/class-wc-gateway-barion-ipn-handler.php
r3184505 r3250059 60 60 61 61 $order->add_order_note(__('Barion callback received.', 'pay-via-barion-for-woocommerce') . ' paymentId: "' . $_GET['paymentId'] . '"'); 62 62 if ($order->meta_exists('_barion_payment_close')) { 63 $order->add_order_note(__('Barion callback ignored, the payment closed.', 'pay-via-barion-for-woocommerce')); 64 exit; 65 } 63 66 if(apply_filters('woocommerce_barion_custom_callback_handler', false, $order, $payment_details)) { 64 67 $order->add_order_note(__('Barion callback was handled by a custom handler.', 'pay-via-barion-for-woocommerce')); … … 88 91 $order->add_order_note(__('Payment succeeded via Barion.', 'pay-via-barion-for-woocommerce')); 89 92 $this->gateway->payment_complete($order, $this->find_transaction_id($payment_details, $order)); 90 93 if ($order->meta_exists('_barion_payment_close')) { 94 $order->update_meta_data("_barion_payment_close", 1); 95 } else { 96 $order->add_meta_data("_barion_payment_close", 1); 97 } 98 $order->save(); 91 99 exit; 92 100 } -
pay-via-barion-for-woocommerce/trunk/includes/class-wc-gateway-barion-request.php
r3145670 r3250059 75 75 $itemModel->Name = $item['name']; 76 76 $itemModel->Description = $itemModel->Name; 77 $itemModel->Unit = __('piece', 'pay-via-barion-for-woocommerce'); 77 $translated_text = __('piece', 'pay-via-barion-for-woocommerce'); 78 $itemModel->Unit = substr(empty($translated_text) ? 'piece' : (string)$translated_text, 0, 50); 78 79 $itemModel->Quantity = empty($item['qty']) ? 1 : $item['qty']; 79 80 80 $itemModel-> UnitPrice = $order->get_item_subtotal($item, true);81 $itemModel->Price = $order->get_item_subtotal($item, true); 81 82 $itemModel->ItemTotal = $order->get_line_subtotal($item, true); 82 83 -
pay-via-barion-for-woocommerce/trunk/index.php
r3184505 r3250059 4 4 Plugin URI: http://github.com/szelpe/woocommerce-barion 5 5 Description: Adds the ability to WooCommerce to pay via Barion 6 Version: 3.8 6 Version: 3.8.1 7 7 Author: Aron Ocsvari <ugyfelszolgalat@bitron.hu> 8 8 Author URI: https://bitron.hu … … 11 11 12 12 WC requires at least: 3.0.0 13 WC tested up to: 9. 3.313 WC tested up to: 9.7.0 14 14 15 15 Text Domain: pay-via-barion-for-woocommerce … … 28 28 29 29 public function __construct() { 30 add_action('plugins_loaded', [$this, 'init'], 10); 30 add_action('init', [$this, 'translation_load'], 5); 31 add_action('init', [$this, 'init'], 10); 32 add_action('woocommerce_blocks_loaded', [$this, 'register_checkout_blocks']); 31 33 } 32 34 function translation_load() { 35 load_plugin_textdomain('pay-via-barion-for-woocommerce', false, plugin_basename(dirname(__FILE__)) . "/languages"); 36 } 33 37 function init() { 34 load_plugin_textdomain('pay-via-barion-for-woocommerce', false, plugin_basename(dirname(__FILE__)) . "/languages");38 35 39 if (!class_exists('WC_Payment_Gateway')) 36 40 return; … … 58 62 } 59 63 } ); 60 61 //Load checkout block class 62 add_action( 'woocommerce_blocks_loaded', function() { 63 64 if( ! class_exists( 'Automattic\WooCommerce\Blocks\Payments\Integrations\AbstractPaymentMethodType' ) ) { 65 return; 66 } 67 68 require_once 'includes/class-wc-gateway-barion-block-checkout.php'; 69 add_action( 70 'woocommerce_blocks_payment_method_type_registration', 71 function( Automattic\WooCommerce\Blocks\Payments\PaymentMethodRegistry $payment_method_registry ) { 72 $payment_method_registry->register( new WC_Gateway_Barion_Blocks ); 73 } ); 74 75 } ); 76 //Adds notification to dashboard 64 //Adds notification to dashboard 77 65 add_action('admin_notices', array($this, 'custom_admin_ad_notice')); 78 66 add_action('wp_ajax_custom_admin_ad_dismiss', array($this, 'custom_admin_ad_dismiss')); 79 67 } 68 public function register_checkout_blocks() { 69 if (!class_exists('Automattic\WooCommerce\Blocks\Payments\Integrations\AbstractPaymentMethodType')) { 70 return; 71 } 72 73 // 🚀 **Először betöltjük a szükséges osztályokat** 🚀 74 require_once 'includes/class-wc-gateway-barion-profile-monitor.php'; 75 require_once 'class-wc-gateway-barion.php'; 76 77 require_once 'includes/class-wc-gateway-barion-block-checkout.php'; 78 79 add_action( 80 'woocommerce_blocks_payment_method_type_registration', 81 function(Automattic\WooCommerce\Blocks\Payments\PaymentMethodRegistry $payment_method_registry) { 82 $payment_method_registry->register(new WC_Gateway_Barion_Blocks); 83 } 84 ); 85 } 80 86 /** 81 87 * Shows a notification about Full Barion pixel -
pay-via-barion-for-woocommerce/trunk/readme.txt
r3184505 r3250059 3 3 Tags: woocommerce, barion, gateway, payment 4 4 Requires at least: 4.0 5 Tested up to: 6. 6.25 Tested up to: 6.7.2 6 6 WC requires at least: 3.0.0 7 WC tested up to: 9. 3.37 WC tested up to: 9.7.0 8 8 Requires PHP: 5.6 9 9 Stable tag: trunk … … 89 89 90 90 == Changelog == 91 = 3.8.1 = 92 - Fixed load translation issue 93 - Fixed TranslatePress issue 94 - Fixed IPN callback issue 91 95 = 3.8 = 92 96 - Fixed the successfull order statuses list.
Note: See TracChangeset
for help on using the changeset viewer.