PluginProbe
Pay with Vipps and MobilePay for WooCommerce / 6.3.0
Pay with Vipps and MobilePay for WooCommerce v6.3.0
6.2.6 6.3.0 6.2.5 6.2.4 6.2.3 6.2.2 6.2.1 6.2.0 6.1.10 6.1.9 6.1.8 6.1.7 6.1.6 6.1.5 6.1.4 6.1.3 6.1.2 6.1.1 6.1.0 6.0.5 6.0.4 6.0.3 6.0.2 6.0.1 6.0.0 All 189 releases
← All changes | payment/WC_Gateway_Vipps.class.php +6 -6 6.2.6 → 6.3.0 View file →
@@ -227,9 +227,9 @@
227 227 return $enabled;
228 228 }
229 229 $is_vipps_express = (bool) $order->get_meta( '_vipps_express_checkout' );
230 230 $has_billing_email = (bool) $order->get_billing_email();
231 - if ( $is_vipps_express && ! $has_billing_email ) {
231 + if ( $is_vipps_express) {
232 232 return false;
233 233 }
234 234 return $enabled;
235 235 }, 10, 3);
@@ -2356,15 +2356,15 @@
2356 2356 // Default should never happen, but just to ensure we are in our enumeration
2357 2357 return "initiated";
2358 2358 }
2359 2359
2360 - // This does not normally call Vipps, so if you need to refresh status, please use callback_check_order_status first. IOK 2019-01-23
2360 + // This does not normally call Vipps, so if you need to refresh status, please use poll_and_check_order_status first. IOK 2019-01-23
2361 2361 public function check_payment_status($order) {
2362 2362 if (!$order) return 'cancelled';
2363 2363 $status = $this->interpret_vipps_order_status($order->get_meta('_vipps_status'));
2364 2364 // This can happen if the vipps status is set from the back end for instance. IOK 2020-08-14
2365 2365 if ($order->get_status() == 'pending' && $status != 'initiated') {
2366 - $this->callback_check_order_status($order);
2366 + $this->poll_and_check_order_status($order);
2367 2367 $order = wc_get_order($order->get_id()); // refresh to get the new status IOK 2021-01-20
2368 2368 $status = $this->interpret_vipps_order_status($order->get_meta('_vipps_status'));
2369 2369 }
2370 2370 return $status;
@@ -2369,9 +2369,9 @@
2369 2369 }
2370 2370 return $status;
2371 2371 }
2372 2372
2373 - // Called by callback_check_order_status and handle_callback to handle the situation where
2373 + // Called by poll_and_check_order_status and handle_callback to handle the situation where
2374 2374 // the payment method has been set to something else *after* Vipps has gotten the order.
2375 2375 // This happens very rarely for people who use Vipps as an external payment method in Klarna, so
2376 2376 // we only do it for orders that match this. IOK 2023-02-03
2377 2377 public function reset_erroneous_payment_method($order) {
@@ -2398,9 +2398,9 @@
2398 2398 }
2399 2399
2400 2400 // Check status of order at Vipps, in case the callback has been delayed or failed.
2401 2401 // Should only be called if in status 'pending'; it will modify the order when status changes.
2402 - public function callback_check_order_status($order, $allow_retry = true) {
2402 + public function poll_and_check_order_status($order, $allow_retry = true) {
2403 2403 global $Vipps;
2404 2404 $orderid = $order->get_id();
2405 2405
2406 2406 clean_post_cache($order->get_id());
@@ -3381,9 +3381,9 @@
3381 3381 $shipping_rate = apply_filters('woo_vipps_express_checkout_shipping_rate',$shipping_rate,$costExTax,$tax,$method,$product);
3382 3382 return $shipping_rate;
3383 3383 }
3384 3384
3385 - // Used by both callback_check_order_status and handle_callback - sets the neccessary order metadata after a successful (or not vipps transaction). IOK 2025-08-13
3385 + // Used by both poll_and_check_order_status and handle_callback - sets the neccessary order metadata after a successful (or not vipps transaction). IOK 2025-08-13
3386 3386 public function order_set_transaction_metadata($order, $transaction) {
3387 3387 // Set Vipps metadata as early as possible
3388 3388 $vippsstamp = strtotime($transaction['timeStamp']);
3389 3389 $vippsamount = $transaction['amount'] ?? '';