Changeset 2883301
- Timestamp:
- 03/20/2023 08:49:50 AM (3 years ago)
- Location:
- sprint/trunk
- Files:
-
- 2 edited
-
includes/Ajax/ERP_SPRINT_Ajax_Service.php (modified) (1 diff)
-
sprint.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
sprint/trunk/includes/Ajax/ERP_SPRINT_Ajax_Service.php
r2792272 r2883301 84 84 ) 85 85 ); 86 86 87 add_action( 'rest_api_init', function () { 88 register_rest_route( 'sprint/v1/', '/waybill_update', array( 89 'methods' => 'GET, POST', 90 'callback' => array($this,'erp_sprint_update_waybill'), 91 )); 92 }); 93 } 94 95 public function erp_sprint_update_waybill($req) { 96 $waybillNumber = $req['waybillNumber']; 97 $status = $req['status']; 98 global $wpdb; 99 $data = $this->erp_pudo_get_setting_array(); 100 $logixgrid_setting = $wpdb->get_row("SELECT * FROM wp_logixgridwaybillSecureKey WHERE waybill_number = '". $waybillNumber ."' and secure_key = '".$data['secureKey']."'",ARRAY_A ); 101 if (count($logixgrid_setting) > 0) { 102 $id = $logixgrid_setting['ID']; 103 $waybill_status = $logixgrid_setting['waybill_status']; 104 $get_status = unserialize($waybill_status); 105 $status = serialize(array($status)); 106 $result = $wpdb->update( 'wp_logixgridwaybillSecureKey', array( 'waybill_status' => $status ),array('ID' => $id)); 107 $data = array('result' => 'Success', 'messageType'=>'Status is updated successfully'); 108 } else { 109 $data = array('result' => 'Error', 'messageType'=>'Waybill doesn\'t not exits'); 110 } 111 return $data; 87 112 } 88 113 -
sprint/trunk/sprint.php
r2794821 r2883301 12 12 Author URI: https://logixgrid.com/ 13 13 Package: Sprint 14 Version: 2.514 Version: 3.5 15 15 Text Domain: Sprint-for-wooCommerce 16 16 Requires at least: 1.0
Note: See TracChangeset
for help on using the changeset viewer.