Changeset 2871518
- Timestamp:
- 02/27/2023 08:42:30 AM (3 years ago)
- Location:
- bosta-woocommerce
- Files:
-
- 17 added
- 2 edited
-
tags/2.9.6 (added)
-
tags/2.9.6/Css (added)
-
tags/2.9.6/Css/main.css (added)
-
tags/2.9.6/assets (added)
-
tags/2.9.6/assets/images (added)
-
tags/2.9.6/assets/images/bosta.svg (added)
-
tags/2.9.6/assets/images/refresh.png (added)
-
tags/2.9.6/assets/images/refreshIcon.png (added)
-
tags/2.9.6/bosta-woocommerce.php (added)
-
tags/2.9.6/components (added)
-
tags/2.9.6/components/estimatedShippingFees (added)
-
tags/2.9.6/components/pickups (added)
-
tags/2.9.6/components/pickups/pickups.css (added)
-
tags/2.9.6/components/pickups/pickups.php (added)
-
tags/2.9.6/readme.txt (added)
-
tags/2.9.6/uninstall.php (added)
-
trunk/bosta-woocommerce.php (modified) (7 diffs)
-
trunk/components/estimatedShippingFees (added)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
bosta-woocommerce/trunk/bosta-woocommerce.php
r2857320 r2871518 5 5 * Author: Bosta 6 6 * Author URI: https://www.bosta.co/ 7 * Version: 2.9. 57 * Version: 2.9.6 8 8 * Requires at least: 5.0 9 9 * php version 7.0 … … 437 437 } 438 438 439 add_filter('bulk_actions-edit-shop_order', 'bosta_sync_cash_collection_orders', 20); 440 function bosta_sync_cash_collection_orders($actions) 441 { 442 $actions['sync_cash_collection_orders'] = __('Send Cash Collection Orders', 'woocommerce'); 443 return $actions; 444 } 445 439 446 add_filter('bulk_actions-edit-shop_order', 'bosta_sync', 20); 440 447 function bosta_sync($actions) … … 447 454 function bosta_sync_handle($redirect_to, $action, $order_ids) 448 455 { 449 if ($action != 'sync_to_bosta' ) {456 if ($action != 'sync_to_bosta' && $action != 'sync_cash_collection_orders') { 450 457 return; 458 } else if ($action == 'sync_cash_collection_orders') { 459 $orderType = 15; 460 $addressType = 'pickupAddress'; 461 } else if ($action == 'sync_to_bosta') { 462 $orderType = 10; 463 $addressType = 'dropOffAddress'; 451 464 } 452 465 global $resultStates; … … 487 500 $newOrder = new stdClass(); 488 501 $newOrder->id = $order->id; 489 $newOrder->type = 10;502 $newOrder->type = $orderType; 490 503 $newOrder->specs = new stdClass(); 491 504 $newOrder … … 533 546 ->receiver->email = $order 534 547 ->billing->email; 535 $newOrder-> dropOffAddress= new stdClass();548 $newOrder->$addressType = new stdClass(); 536 549 $newOrder 537 -> dropOffAddress->firstLine = $order550 ->$addressType->firstLine = $order 538 551 ->shipping->address_1; 539 552 if (is_numeric($order … … 544 557 ->state]->districtId; 545 558 $newOrder 546 -> dropOffAddress->districtId = $shippingDistrictId;559 ->$addressType->districtId = $shippingDistrictId; 547 560 } else { 548 561 $result = preg_split("/\s*(?<!\w(?=.\w))[\-[\]()]\s*/", $order … … 555 568 ->city; 556 569 $newOrder 557 -> dropOffAddress->districtName = $shippingDistrictName;570 ->$addressType->districtName = $shippingDistrictName; 558 571 $newOrder 559 -> dropOffAddress->zone = $shippingZoneName;572 ->$addressType->zone = $shippingZoneName; 560 573 $newOrder 561 -> dropOffAddress->city = $shippingCityName;574 ->$addressType->city = $shippingCityName; 562 575 } 563 576 if ($order->payment_method == 'cod') { -
bosta-woocommerce/trunk/readme.txt
r2857320 r2871518 7 7 Requires PHP: 7.0 8 8 Tested up to: 6.1.1 9 Stable tag: 2.9. 59 Stable tag: 2.9.6 10 10 WC requires at least: 2.6 11 11 WC tested up to: 7.2.2 … … 144 144 = 2.9.5 = 145 145 * Add Allow to Open Package Option 146 147 = 2.9.6 = 148 * Add cash collection orders
Note: See TracChangeset
for help on using the changeset viewer.