Changeset 3229864
- Timestamp:
- 01/27/2025 06:20:35 PM (14 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
r3226449 r3229864 879 879 } 880 880 } 881 882 //Update route included order statuses and route cancel order statuses when the order is created by the admin page without route fee 883 if(is_admin()){ 884 $this->updateRouteIncludedOrderStatusMetaFields( $order ); 885 } 881 886 } 882 887 … … 1641 1646 } 1642 1647 1648 /** 1649 * @param $order 1650 * 1651 * @return void 1652 */ 1653 public function updateRouteIncludedOrderStatusMetaFields( $order ): void { 1654 try { 1655 $acceptedOrderStatuses = get_option( 'routeapp_included_order_statuses' ) ? get_option( 'routeapp_included_order_statuses' ) : []; 1656 $acceptedCanceledStatuses = get_option( 'routeapp_cancel_order_statuses' ) ? get_option( 'routeapp_cancel_order_statuses' ) : []; 1657 1658 if ( class_exists( 'Automattic\WooCommerce\Utilities\OrderUtil' ) 1659 && OrderUtil::custom_orders_table_usage_is_enabled() ) { 1660 //save to order the configuration selected regarding order statuses 1661 $order->update_meta_data( '_routeapp_included_order_statuses', json_encode( $acceptedOrderStatuses ) ); 1662 $order->update_meta_data( '_routeapp_cancel_order_statuses', json_encode( $acceptedCanceledStatuses ) ); 1663 $order->save(); 1664 } else { 1665 update_post_meta( $order->get_id(), '_routeapp_included_order_statuses', json_encode( $acceptedOrderStatuses ) ); 1666 update_post_meta( $order->get_id(), '_routeapp_cancel_order_statuses', json_encode( $acceptedCanceledStatuses ) ); 1667 } 1668 } catch ( Exception $e ) { 1669 // Log the exception and ensure the application flow continues 1670 error_log( "An error occurred while updating Route order status meta fields: " . $e->getMessage() ); 1671 } 1672 } 1673 1643 1674 } 1644 1675 -
routeapp/trunk/readme.txt
r3226449 r3229864 6 6 Requires at least: 4.0 7 7 Tested up to: 6.7.1 8 Stable tag: 2.2.2 38 Stable tag: 2.2.24 9 9 Requires PHP: 5.6 10 10 License: GPLv2 or later … … 106 106 107 107 == Changelog == 108 = 2.2.24 = 109 * Update Route Order Status for admin orders without Route Fee 110 108 111 = 2.2.23 = 109 112 * Display correctly route fee amount in orders admin view -
routeapp/trunk/routeapp.php
r3226449 r3229864 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 312 * Version: 2.2.24 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 3' );28 define( 'ROUTEAPP_VERSION', '2.2.24' ); 29 29 30 30 /**
Note: See TracChangeset
for help on using the changeset viewer.