Changeset 3339895
- Timestamp:
- 08/05/2025 09:38:34 PM (8 months ago)
- Location:
- routeapp/trunk
- Files:
-
- 3 edited
-
public/class-routeapp-public.php (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
-
routeapp.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
routeapp/trunk/public/class-routeapp-public.php
r3229864 r3339895 154 154 155 155 add_action('woocommerce_order_details_after_order_table', array($this, 'order_updates_route_tracking'), 1, 1); 156 157 add_action('woocommerce_blocks_checkout_update_order_meta', array($this, 'routeapp_save_order_status_to_order'), 10, 1); 158 add_action('woocommerce_store_api_checkout_update_order_meta', array($this, 'routeapp_save_order_status_to_order'), 10, 1); 156 159 } 157 160 … … 767 770 return true; 768 771 } 772 773 774 /** 775 * Updates Route-related metadata to the order after it is placed in draft status. 776 * 777 * This method is triggered when an order is created in draft status and is responsible for 778 * adding meta fields with the list Route sync status. 779 * This prevents incorrect synchronization of draft orders. 780 * 781 * @param int $order_id The ID of the WooCommerce order. 782 */ 783 public function routeapp_save_order_status_to_order( $order_id ) { 784 if ( ! $order_id || ! WC()->session ) { 785 return; 786 } 787 788 try { 789 $order = wc_get_order( $order_id ); 790 791 if ( ! $order ) { 792 throw new Exception( "Order with ID {$order_id} could not be retrieved." ); 793 } 794 795 $this->updateRouteIncludedOrderStatusMetaFields( $order ); 796 797 } catch ( Exception $e ) { 798 error_log( "An error occurred while updating Route order status meta fields for order ID {$order_id}: " . $e->getMessage() ); 799 } 800 } 801 769 802 770 803 /** -
routeapp/trunk/readme.txt
r3327817 r3339895 6 6 Requires at least: 4.0 7 7 Tested up to: 6.7.1 8 Stable tag: 2.2.2 78 Stable tag: 2.2.28 9 9 Requires PHP: 5.6 10 10 License: GPLv2 or later … … 106 106 107 107 == Changelog == 108 109 = 2.2.28 = 110 * Add Route metaData to draft orders 108 111 109 112 = 2.2.27 = -
routeapp/trunk/routeapp.php
r3327817 r3339895 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 712 * Version: 2.2.28 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 7' );28 define( 'ROUTEAPP_VERSION', '2.2.28' ); 29 29 30 30 /**
Note: See TracChangeset
for help on using the changeset viewer.