PluginProbe
Pay with Vipps and MobilePay for WooCommerce / 6.2.5
Pay with Vipps and MobilePay for WooCommerce v6.2.5
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 5.4.3 5.4.2 All 187 releases
← All changes | payment/WC_Gateway_Vipps.class.php +3 -2 6.2.3 → 6.2.5 View file →
@@ -3762,9 +3762,9 @@
3762 3762 }
3763 3763 do_action('woo_vipps_payment_complete_at_shutdown', $order, $this);
3764 3764 } catch (Exception $e) {
3765 3765 // This is/should be non-critical so just log it.
3766 - $this->log(sprintf(__("Could not do all payment-complete actions on %1\$s order %2\$d: %3\$s ", 'woo-vipps'), Vipps::CompanyName(), $orderid, $e->etMessage()), "error");
3766 + $this->log(sprintf(__("Could not do all payment-complete actions on %1\$s order %2\$d: %3\$s ", 'woo-vipps'), Vipps::CompanyName(), $orderid, $e->getMessage()), "error");
3767 3767 }
3768 3768 }
3769 3769
3770 3770 // This is run on payment complete. Per default will it only add a link to the order confirmation page, but
@@ -3871,9 +3871,9 @@
3871 3871
3872 3872 $contents = WC()->cart->get_cart_contents();
3873 3873 $contents = apply_filters('woo_vipps_create_express_checkout_cart_contents',$contents);
3874 3874 try {
3875 - $cart_hash = md5(json_encode(wc_clean($contents)) . WC()->cart->total);
3875 + $cart_hash = WC()->cart->get_cart_hash();
3876 3876 $order = new WC_Order();
3877 3877 $order->set_status('pending');
3878 3878 $order->set_payment_method($this);
3879 3879 if ($ischeckout) {
@@ -3884,8 +3884,9 @@
3884 3884 }
3885 3885 // We use 'checkout' as the created_via key as per requests, but allow merchants to use their own. IOK 2022-09-15
3886 3886 $created_via = apply_filters('woo_vipps_express_checkout_created_via', 'checkout', $order, $ischeckout);
3887 3887 $order->set_created_via($created_via);
3888 + $order->set_cart_hash($cart_hash);
3888 3889
3889 3890 $dummy = sprintf(__('Vipps Express Checkout', 'woo-vipps')); // this is so gettext will find this string.
3890 3891 $dummy = sprintf(__('Vipps Checkout', 'woo-vipps')); // this is so gettext will find this string.
3891 3892