Changeset 2407508
- Timestamp:
- 10/27/2020 11:22:45 AM (5 years ago)
- Location:
- doorhub
- Files:
-
- 41 added
- 6 edited
-
tags/1.1.0/wc-doorhub.php (modified) (1 diff)
-
tags/1.1.1 (added)
-
tags/1.1.1/LICENSE.txt (added)
-
tags/1.1.1/README.md (added)
-
tags/1.1.1/admin (added)
-
tags/1.1.1/admin/class-wc-doorhub-admin.php (added)
-
tags/1.1.1/admin/css (added)
-
tags/1.1.1/admin/css/wc-doorhub-admin.css (added)
-
tags/1.1.1/admin/index.php (added)
-
tags/1.1.1/admin/partials (added)
-
tags/1.1.1/admin/partials/order-doorhub-metabox.php (added)
-
tags/1.1.1/assets (added)
-
tags/1.1.1/assets/screenshot-1.png (added)
-
tags/1.1.1/assets/screenshot-2.png (added)
-
tags/1.1.1/assets/screenshot-3.png (added)
-
tags/1.1.1/assets/screenshot-4.png (added)
-
tags/1.1.1/includes (added)
-
tags/1.1.1/includes/class-wc-doorhub-activator.php (added)
-
tags/1.1.1/includes/class-wc-doorhub-communicator.php (added)
-
tags/1.1.1/includes/class-wc-doorhub-deactivator.php (added)
-
tags/1.1.1/includes/class-wc-doorhub-i18n.php (added)
-
tags/1.1.1/includes/class-wc-doorhub-loader.php (added)
-
tags/1.1.1/includes/class-wc-doorhub.php (added)
-
tags/1.1.1/includes/index.php (added)
-
tags/1.1.1/index.php (added)
-
tags/1.1.1/languages (added)
-
tags/1.1.1/languages/wc-doorhub.pot (added)
-
tags/1.1.1/public (added)
-
tags/1.1.1/public/class-wc-doorhub-public.php (added)
-
tags/1.1.1/public/class-wc-doorhub-shipping.php (added)
-
tags/1.1.1/public/css (added)
-
tags/1.1.1/public/css/wc-doorhub-public.css (added)
-
tags/1.1.1/public/index.php (added)
-
tags/1.1.1/public/js (added)
-
tags/1.1.1/public/js/jquery.mask.min.js (added)
-
tags/1.1.1/public/js/wc-doorhub-checkout-date.js (added)
-
tags/1.1.1/public/js/wc-doorhub-checkout.js (added)
-
tags/1.1.1/public/partials (added)
-
tags/1.1.1/public/partials/wc-doorhub-public-display.php (added)
-
tags/1.1.1/readme.txt (added)
-
tags/1.1.1/uninstall.php (added)
-
tags/1.1.1/wc-doorhub.php (added)
-
trunk/README.md (modified) (1 diff)
-
trunk/includes/class-wc-doorhub-communicator.php (modified) (3 diffs)
-
trunk/includes/class-wc-doorhub.php (modified) (1 diff)
-
trunk/readme.txt (modified) (1 diff)
-
trunk/wc-doorhub.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
doorhub/tags/1.1.0/wc-doorhub.php
r2405210 r2407508 14 14 * Plugin Name: Doorhub 15 15 * Description: You can easily integrate Doorhub.io using this plugin 16 * Version: 1.1. 016 * Version: 1.1.1 17 17 * Author: Doorhub 18 18 * Author URI: https://doorhub.io -
doorhub/trunk/README.md
r2405210 r2407508 4 4 Requires at least: 3.0.1 5 5 Tested up to: 5.4.1 6 Stable tag: 1.1. 06 Stable tag: 1.1.1 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html -
doorhub/trunk/includes/class-wc-doorhub-communicator.php
r2405210 r2407508 31 31 $this->api_key = get_option( 'wc_doorhub_api' ); 32 32 $this->api_url = 'https://doorhub.io'; 33 33 34 } 34 35 … … 46 47 } 47 48 48 49 $address = WC()->countries->get_formatted_address( $order->get_address( 'shipping' ), ', ' ); 50 51 $pickup_date = $order->get_meta( 'shipping_pickup' ); 52 $pickup_date = $pickup_date ? $pickup_date : current_time( 'Y-m-d' ); 53 54 $data = array( 55 'dropOffAddress' => $address, 56 'customerName' => $order->get_shipping_first_name() . ' ' . $order->get_shipping_last_name(), 57 'customerPhone' => $order->get_billing_phone(), 58 'customerFloor' => 1, 59 'productSize' => 'medium', 60 'warehouseId' => get_option('wc_doorhub_warehouse'), 61 'deliveryId' => $order->get_id(), 62 'dateForDropOff' => $pickup_date, 63 'distributionId' => 1, 64 'deliveryType' => 1, 65 'plugin' => ['name' => 'woocommerce'] 66 ); 67 68 $response = $this->request( $this->api_url.'/api/sameday/v1/warehouse/order/checkout', $data ); 69 70 //Update Information Back to Order 71 update_post_meta( $order->get_id(), 'doorhub_response', $response ); 72 if ( isset( $response->success ) && $response->success ) { 73 update_post_meta( $order->get_id(), 'doorhub_order_ref', $response->data->orderRef ); 74 update_post_meta( $order->get_id(), 'doorhub_service', $response->data->serviceName ); 75 } 76 77 return $response; 49 $shipping_method = $order->get_shipping_method(); 50 51 //error_log($shipping_method); 52 53 if($shipping_method == 'Doorhub Shipping'){ 54 $address = WC()->countries->get_formatted_address( $order->get_address( 'shipping' ), ', ' ); 55 56 $pickup_date = $order->get_meta( 'shipping_pickup' ); 57 $pickup_date = $pickup_date ? $pickup_date : current_time( 'Y-m-d' ); 58 59 $data = array( 60 'dropOffAddress' => $address, 61 'customerName' => $order->get_shipping_first_name() . ' ' . $order->get_shipping_last_name(), 62 'customerPhone' => $order->get_billing_phone(), 63 'customerFloor' => 1, 64 'productSize' => 'medium', 65 'warehouseId' => get_option('wc_doorhub_warehouse'), 66 'deliveryId' => $order->get_id(), 67 'dateForDropOff' => $pickup_date, 68 'distributionId' => 1, 69 'deliveryType' => 1, 70 'plugin' => ['name' => 'woocommerce'] 71 ); 72 73 $response = $this->request( $this->api_url.'/api/sameday/v1/warehouse/order/checkout', $data ); 74 75 //Update Information Back to Order 76 update_post_meta( $order->get_id(), 'doorhub_response', $response ); 77 if ( isset( $response->success ) && $response->success ) { 78 update_post_meta( $order->get_id(), 'doorhub_order_ref', $response->data->orderRef ); 79 update_post_meta( $order->get_id(), 'doorhub_service', $response->data->serviceName ); 80 } 81 82 return $response; 83 } 78 84 } 79 85 … … 141 147 $data['storeId'] = get_option('wc_doorhub_warehouse'); 142 148 143 return $this->request( $this->api_url.'/api/sameday/v1/warehouse/customer/address/check', $data ); 149 $response = $this->request( $this->api_url.'/api/sameday/v1/warehouse/customer/address/check', $data ); 150 151 return $response; 144 152 } 145 153 -
doorhub/trunk/includes/class-wc-doorhub.php
r2313026 r2407508 76 76 $this->version = WC_DOORHUB_VERSION; 77 77 } else { 78 $this->version = '1. 0.0';78 $this->version = '1.1.0'; 79 79 } 80 80 $this->plugin_name = 'wc-doorhub'; -
doorhub/trunk/readme.txt
r2405210 r2407508 4 4 Requires at least: 3.0.1 5 5 Tested up to: 5.4.1 6 Stable tag: 1.1. 06 Stable tag: 1.1.1 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html -
doorhub/trunk/wc-doorhub.php
r2405210 r2407508 14 14 * Plugin Name: Doorhub 15 15 * Description: You can easily integrate Doorhub.io using this plugin 16 * Version: 1.1. 016 * Version: 1.1.1 17 17 * Author: Doorhub 18 18 * Author URI: https://doorhub.io … … 33 33 * Rename this for your plugin and update it as you release new versions. 34 34 */ 35 define( 'WC_DOORHUB_VERSION', '1.1. 0' );35 define( 'WC_DOORHUB_VERSION', '1.1.1' ); 36 36 37 37 /**
Note: See TracChangeset
for help on using the changeset viewer.