Changeset 3206152
- Timestamp:
- 12/11/2024 08:38:01 AM (16 months ago)
- Location:
- riskcube-von-creditreform-schweiz/trunk
- Files:
-
- 3 edited
-
readme.txt (modified) (2 diffs)
-
riskcube.php (modified) (1 diff)
-
src/Core/RiskCube.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
riskcube-von-creditreform-schweiz/trunk/readme.txt
r3192015 r3206152 5 5 Tested up to: 6.3 6 6 Requires PHP: 7.4 7 Stable Tag: 2.4.12. 77 Stable Tag: 2.4.12.8 8 8 License: GPLv3 9 9 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 144 144 145 145 == Changelog == 146 = 2.4.12.8 = 147 **Bug Fixes** 148 - Fixed PHP error when Cart is null 149 146 150 = 2.4.12.7 = 151 147 152 **Bug Fixes** 148 153 - Fixed possible server error, when new order is created -
riskcube-von-creditreform-schweiz/trunk/riskcube.php
r3192012 r3206152 6 6 * Plugin Name: RiskCUBE von Creditreform Schweiz 7 7 * Plugin URI: 8 * Version: 2.4.12. 78 * Version: 2.4.12.8 9 9 * Description: RiskCube 10 10 * Author: NXTLVL Development GMBH -
riskcube-von-creditreform-schweiz/trunk/src/Core/RiskCube.php
r3191967 r3206152 273 273 public static function woocommerce_new_order($id_order) 274 274 { 275 static::on_order_state_change($id_order );276 } 277 278 public static function on_order_state_change($id_order )275 static::on_order_state_change($id_order, $from, $to_status); 276 } 277 278 public static function on_order_state_change($id_order, $from, $to_status) 279 279 { 280 280 $order = wc_get_order($id_order); 281 281 282 if (get_option('wc_riskcube_fk_confirm_state') === 'wc-' . $ order->get_status()) {282 if (get_option('wc_riskcube_fk_confirm_state') === 'wc-' . $to_status ) { 283 283 // NXTLVL-182 in wc classic, the hooks are called in the wrong order. 284 284 // with this workaround, the order is checked wether it has been confirmed … … 287 287 $user_id = apply_filters( 'determine_current_user', false ); 288 288 $isOnWhitelist = ClaimDataHelper::checkCustomerWhitelist($user_id); 289 290 289 if (!$is_confirmed && self::$isClassicCheckout) { 291 292 290 // NXTLVL-223 293 291 if (!($user_id && $isOnWhitelist)) { … … 420 418 $do_api = true; 421 419 if (array_key_exists('riskcube_auth', $sessionData) && array_key_exists('riskcube_total', $sessionData)) { 422 if ($sessionData['riskcube_total'] == WC()->cart->get_totals()['total']) { 420 /* Fixed error from debug log: Call to a member function get_totals() on null */ 421 $cart_total = ( WC()->cart && !WC()->cart->is_empty() ) ? WC()->cart->get_totals()['total'] : 0; 422 if ($sessionData['riskcube_total'] == $cart_total) { 423 423 $res = $sessionData['riskcube_auth']; 424 424 $do_api = false;
Note: See TracChangeset
for help on using the changeset viewer.