Changeset 2428367
- Timestamp:
- 11/30/2020 06:19:47 AM (5 years ago)
- Location:
- doshii
- Files:
-
- 1 added
- 6 edited
-
tags/2.3.2 (added)
-
trunk/README.txt (modified) (2 diffs)
-
trunk/doshii_function.php (modified) (2 diffs)
-
trunk/include/woo-doshii-initialise.php (modified) (1 diff)
-
trunk/include/woo-doshii-product-sync.php (modified) (1 diff)
-
trunk/include/woo-order-api.php (modified) (9 diffs)
-
trunk/include/woo-order-status.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
doshii/trunk/README.txt
r2427008 r2428367 5 5 Requires at least: 4.7 6 6 Tested up to: 5.5.1 7 Stable tag: 2.3. 17 Stable tag: 2.3.2 8 8 Requires PHP: 7.0 9 9 License: GPLv2 or later … … 60 60 == Changelog == 61 61 62 = 2.3. 1=62 = 2.3.2 = 63 63 64 64 Improved remote troubleshooting capabilities -
doshii/trunk/doshii_function.php
r2427008 r2428367 7 7 Author URI: 8 8 Contributors: 9 Version: 2.3. 19 Version: 2.3.2 10 10 */ 11 11 … … 30 30 31 31 register_activation_hook( __FILE__, 'doshii_on_activation' ); 32 wp_enqueue_style( 'doshiistyle', DOSHII_BASE_URL . 'include/assets/css/doshii-style.css',false,'2.3. 1','all');32 wp_enqueue_style( 'doshiistyle', DOSHII_BASE_URL . 'include/assets/css/doshii-style.css',false,'2.3.2','all'); 33 33 include(DOSHII_BASE_DIR . '/include/woo-doshii-dbtable.php'); 34 34 include(DOSHII_BASE_DIR . '/include/woo-checkout-fields.php'); -
doshii/trunk/include/woo-doshii-initialise.php
r2427008 r2428367 40 40 'x-doshii-location-id' => $locationId.'', 41 41 'content-Type' => 'application/json', 42 'x-doshii-writeout' => 'WooCommerce 2.3. 1',42 'x-doshii-writeout' => 'WooCommerce 2.3.2', 43 43 ); 44 44 -
doshii/trunk/include/woo-doshii-product-sync.php
r2427008 r2428367 41 41 'x-doshii-location-id' => $locationId.'', 42 42 'content-Type' => 'application/json', 43 'x-doshii-writeout' => 'WooCommerce 2.3. 1',43 'x-doshii-writeout' => 'WooCommerce 2.3.2', 44 44 ) 45 45 )); -
doshii/trunk/include/woo-order-api.php
r2427008 r2428367 27 27 $transactionsData =[]; 28 28 $surcounts = []; 29 $taxes = []; 29 30 $doshiiOrderType = ''; 30 31 … … 97 98 } 98 99 99 $shippingTotal = doshii_to_cents($order->get_shipping_total() );100 $shippingTotal = doshii_to_cents($order->get_shipping_total() + $order->get_shipping_tax()); 100 101 if ($shippingTotal && $shippingTotal > 0) { 101 102 $shippingFeePosId = $doshii_options['shipping_fee_id']; … … 118 119 } 119 120 121 $taxTotal = doshii_to_cents($order->get_cart_tax()); 122 array_push($taxes, (object)[ 123 'name' => 'Tax', 124 'amount' => $taxTotal, 125 'type' => 'absolute', 126 'taxType' => $order->get_prices_include_tax() ? 'inclusive' : 'exclusive', 127 'value' => $taxTotal 128 ]); 129 120 130 foreach ( $order->get_items( 'coupon' ) as $coupon ) { 121 131 $couponCode = $coupon->get_code(); … … 150 160 $externalOrderRef = $order_id; 151 161 162 $woocommerceItems = []; 152 163 foreach ( $order->get_items() as $item_id => $item ) { 164 array_push($woocommerceItems, $item->get_data()); 153 165 $product_id = $item->get_product_id(); 154 166 $variation_id = $item->get_variation_id(); … … 158 170 $name = $item->get_name(); 159 171 $quantity = $item->get_quantity(); 160 $subtotal = $ item->get_subtotal();172 $subtotal = $order->get_line_total($item, $order->get_prices_include_tax(), true); 161 173 162 174 $productPrice = doshii_to_cents($product_price); … … 435 447 'items' => $itemData, 436 448 'surcounts' => $surcounts, 437 'taxes' => []449 'taxes' => $taxes 438 450 ]; 439 451 … … 465 477 $doshiiOrder->notes = strlen($notes) > 255 ? substr($notes, 255) : $notes; 466 478 } 479 480 $woocommerceOrder = $order->get_data(); 481 $woocommerceOrder['order_items'] = $woocommerceItems; 467 482 $doshiiOrderPayload = (object) [ 468 483 'order' => $doshiiOrder, … … 474 489 ], 475 490 'transactions' => $transactionsData, 476 'woocommerce' => $ order->get_data()491 'woocommerce' => $woocommerceOrder 477 492 ]; 478 493 … … 487 502 'accept' => 'application/json', 488 503 'Accept-encoding' => 'gzip', 489 'x-doshii-writeout' => 'WooCommerce 2.3. 1',504 'x-doshii-writeout' => 'WooCommerce 2.3.2', 490 505 ), 491 506 'body' => json_encode($doshiiOrderPayload) -
doshii/trunk/include/woo-order-status.php
r2427008 r2428367 39 39 'x-doshii-location-id' => $doshii_options['location_id'].'', 40 40 'content-Type' => 'application/json', 41 'x-doshii-writeout' => 'WooCommerce 2.3. 1',41 'x-doshii-writeout' => 'WooCommerce 2.3.2', 42 42 ) 43 43 ));
Note: See TracChangeset
for help on using the changeset viewer.