Changeset 3486821
- Timestamp:
- 03/19/2026 08:50:22 PM (9 days ago)
- Location:
- routeapp/trunk
- Files:
-
- 1 added
- 3 edited
-
includes/class-routeapp-blocks-integration.php (added)
-
public/js/routeapp-public-pbc.js (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
-
routeapp.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
routeapp/trunk/public/js/routeapp-public-pbc.js
r3473063 r3486821 67 67 */ 68 68 function triggerBlocksCheckoutCartUpdate() { 69 if (isBlocksCheckoutAvailable()) { 70 try { 71 wc.blocksCheckout.extensionCartUpdate({ 72 namespace: 'route-widget-integration', 73 data: { 74 checkbox: RouteConfig.checkbox === Route.Coverage.ActiveByDefault 75 } 76 }).then(function() { 77 // Cart update successful - the frontend will automatically refresh 78 }).catch(function(error) { 79 console.error('Route widget: Cart update failed:', error); 80 // Fallback to traditional checkout update 81 triggerCheckoutUpdate(); 82 }); 83 } catch (error) { 84 console.error('Route widget: Error triggering blocks checkout update:', error); 85 // Fallback to traditional checkout update 69 if (!isBlocksCheckoutAvailable()) { 70 triggerCheckoutUpdate(); 71 return; 72 } 73 74 try { 75 wc.blocksCheckout.extensionCartUpdate({ 76 namespace: 'route-widget-integration', 77 data: { 78 checkbox: RouteConfig.checkbox === Route.Coverage.ActiveByDefault 79 } 80 }).catch(function(error) { 81 console.error('Route widget: Cart update failed:', error); 82 }).finally(function() { 86 83 triggerCheckoutUpdate(); 87 } 88 } else{89 // Fallback to traditional checkout update if blocks checkout is not available84 }); 85 } catch (error) { 86 console.error('Route widget: Error triggering blocks checkout update:', error); 90 87 triggerCheckoutUpdate(); 91 88 } … … 102 99 }, 103 100 success: function () { 104 if (RouteConfig.is_cart_page) { 101 if (isBlocksCheckoutAvailable()) { 102 triggerBlocksCheckoutCartUpdate(); 103 } else if (RouteConfig.is_cart_page) { 105 104 triggerCartUpdate(); 106 105 } else { 107 // Use blocks checkout update if available, otherwise fallback to traditional 108 if (isBlocksCheckoutAvailable()) { 109 triggerBlocksCheckoutCartUpdate(); 110 } else { 111 triggerCheckoutUpdate(); 112 } 106 triggerCheckoutUpdate(); 113 107 } 114 108 -
routeapp/trunk/readme.txt
r3473063 r3486821 6 6 Requires at least: 4.0 7 7 Tested up to: 6.7.1 8 Stable tag: 2.3. 08 Stable tag: 2.3.1 9 9 Requires PHP: 5.6 10 10 License: GPLv2 or later … … 106 106 107 107 == Changelog == 108 109 = 2.3.1 = 110 * Fix checkout order summary not updating when Route protection is toggled on blocks-based checkout 108 111 109 112 = 2.3.0 = -
routeapp/trunk/routeapp.php
r3473063 r3486821 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.3. 012 * Version: 2.3.1 13 13 * Author: Route 14 14 * Author URI: https://route.com/ … … 26 26 * Currently plugin version. 27 27 */ 28 define( 'ROUTEAPP_VERSION', '2.3. 0' );28 define( 'ROUTEAPP_VERSION', '2.3.1' ); 29 29 30 30 /**
Note: See TracChangeset
for help on using the changeset viewer.