Changeset 3391431
- Timestamp:
- 11/06/2025 08:44:47 PM (4 months ago)
- Location:
- routeapp/trunk
- Files:
-
- 3 edited
-
public/class-routeapp-public.php (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
-
routeapp.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
routeapp/trunk/public/class-routeapp-public.php
r3339895 r3391431 364 364 * Add route insurance fee in checkout and cart 365 365 * @since 1.0.0 366 * @param Object $cart 367 * 368 */ 369 public function checkout_route_insurance_fee( $cart ) { 366 * @param Object $cart_or_checkout 367 * MSS-6261:The issue: checkout_route_insurance_fee is bound to hooks that pass different parameter types: 368 * woocommerce_checkout_before_order_review -> WC_Checkout 369 * woocommerce_cart_calculate_fees -> WC_Cart 370 * At line 388, it assumes a WC_Cart and calls get_cart_hash(), which fails when a WC_Checkout is passed. 371 * Fixing by detecting the object type and handling both cases. 372 */ 373 public function checkout_route_insurance_fee( $cart_or_checkout ) { 370 374 if ( (is_admin() && ! defined( 'DOING_AJAX' )) ) return; 371 375 372 $cart = empty($cart) ? WC()->cart : $cart; 376 // Determine if we received a WC_Cart or WC_Checkout object 377 $is_checkout_object = is_a( $cart_or_checkout, 'WC_Checkout' ); 378 $cart = $is_checkout_object ? WC()->cart : $cart_or_checkout; 379 380 // Use WC()->cart as fallback if not a valid WC_Cart 381 if ( is_null( $cart ) || ! is_a( $cart, 'WC_Cart' ) ) { 382 $cart = WC()->cart; 383 } 384 373 385 $checkbox = WC()->session->get( 'checkbox_checked' ); 374 386 -
routeapp/trunk/readme.txt
r3339895 r3391431 6 6 Requires at least: 4.0 7 7 Tested up to: 6.7.1 8 Stable tag: 2.2.2 88 Stable tag: 2.2.29 9 9 Requires PHP: 5.6 10 10 License: GPLv2 or later … … 106 106 107 107 == Changelog == 108 109 = 2.2.29 = 110 * Add compatibility with plugin yith-woocommerce-multi-step-checkout-premium 111 108 112 109 113 = 2.2.28 = -
routeapp/trunk/routeapp.php
r3339895 r3391431 10 10 * Plugin URI: https://route.com/for-merchants/ 11 11 * Description: Route allows shoppers to insure their orders with one-click during checkout, adding a layer of 3rd party trust while improving the customer shopping experience. 12 * Version: 2.2.2 812 * Version: 2.2.29 13 13 * Author: Route 14 14 * Author URI: https://route.com/ … … 26 26 * Currently plugin version. 27 27 */ 28 define( 'ROUTEAPP_VERSION', '2.2.2 8' );28 define( 'ROUTEAPP_VERSION', '2.2.29' ); 29 29 30 30 /**
Note: See TracChangeset
for help on using the changeset viewer.