Changeset 3488939
- Timestamp:
- 03/23/2026 11:55:07 AM (5 days ago)
- Location:
- shiptastic-integration-for-dhl
- Files:
-
- 20 edited
- 1 copied
-
tags/4.1.8 (copied) (copied from shiptastic-integration-for-dhl/trunk)
-
tags/4.1.8/readme.txt (modified) (2 diffs)
-
tags/4.1.8/shiptastic-integration-for-dhl.php (modified) (1 diff)
-
tags/4.1.8/src/Admin/Importer/DHL.php (modified) (3 diffs)
-
tags/4.1.8/src/Admin/Importer/Internetmarke.php (modified) (1 diff)
-
tags/4.1.8/src/Api/LabelRest.php (modified) (1 diff)
-
tags/4.1.8/src/Install.php (modified) (1 diff)
-
tags/4.1.8/src/Package.php (modified) (1 diff)
-
tags/4.1.8/src/ParcelServices.php (modified) (2 diffs)
-
tags/4.1.8/vendor/composer/installed.php (modified) (2 diffs)
-
tags/4.1.8/vendor/composer/jetpack_autoload_classmap.php (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/shiptastic-integration-for-dhl.php (modified) (1 diff)
-
trunk/src/Admin/Importer/DHL.php (modified) (3 diffs)
-
trunk/src/Admin/Importer/Internetmarke.php (modified) (1 diff)
-
trunk/src/Api/LabelRest.php (modified) (1 diff)
-
trunk/src/Install.php (modified) (1 diff)
-
trunk/src/Package.php (modified) (1 diff)
-
trunk/src/ParcelServices.php (modified) (2 diffs)
-
trunk/vendor/composer/installed.php (modified) (2 diffs)
-
trunk/vendor/composer/jetpack_autoload_classmap.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
shiptastic-integration-for-dhl/tags/4.1.8/readme.txt
r3432630 r3488939 3 3 Tags: shipping, UPS, shiptastic, woocommerce 4 4 Requires at least: 5.4 5 Tested up to: 6.96 Stable tag: 4.1. 75 Tested up to: 7.0 6 Stable tag: 4.1.8 7 7 Requires PHP: 7.0 8 8 License: GPLv3 … … 34 34 35 35 == Changelog == 36 = 4.1.8 = 37 * Improvement: Prevent side-effects in parcel services logic 38 * Improvement: Import DHL settings during first install 39 * Improvement: Transmit phone number by default for international labels 40 36 41 = 4.1.7 = 37 42 * Improvement: Register additional CDP countries -
shiptastic-integration-for-dhl/tags/4.1.8/shiptastic-integration-for-dhl.php
r3432630 r3488939 6 6 * Author: vendidero 7 7 * Author URI: https://vendidero.de 8 * Version: 4.1. 78 * Version: 4.1.8 9 9 * Requires PHP: 7.0 10 10 * License: GPLv3 -
shiptastic-integration-for-dhl/tags/4.1.8/src/Admin/Importer/DHL.php
r3313135 r3488939 7 7 defined( 'ABSPATH' ) || exit; 8 8 9 /**10 * WC_Admin class.11 */12 9 class DHL { 13 14 10 public static function is_available() { 15 11 $options = get_option( 'woocommerce_pr_dhl_paket_settings' ); 16 $imported = get_option( 'woocommerc _stc_dhl_import_finished' );12 $imported = get_option( 'woocommerce_stc_dhl_import_finished' ); 17 13 $user = ''; 18 14 … … 141 137 $dhl->save(); 142 138 139 update_option( 'woocommerce_stc_dhl_import_finished', 'yes', false ); 140 143 141 return true; 144 142 } 145 143 146 144 public static function import_order_data( $limit = 10, $offset = 0 ) { 147 148 145 $orders = wc_get_orders( 149 146 array( … … 158 155 if ( ! empty( $orders ) ) { 159 156 foreach ( $orders as $order ) { 160 161 157 if ( ! $order->get_meta( '_shipping_address_type' ) ) { 162 163 158 // Update order pickup type from official DHL plugin 164 159 if ( self::order_has_pickup( $order ) ) { 165 166 160 $order->update_meta_data( '_shipping_address_type', 'dhl' ); 167 161 $order->update_meta_data( '_shipping_dhl_postnumber', $order->get_meta( '_shipping_dhl_postnum' ) ); -
shiptastic-integration-for-dhl/tags/4.1.8/src/Admin/Importer/Internetmarke.php
r3313135 r3488939 50 50 51 51 $deutsche_post->save(); 52 53 update_option( 'woocommerce_stc_internetmarke_import_finished', 'yes', false ); 54 52 55 return true; 53 56 } -
shiptastic-integration-for-dhl/tags/4.1.8/src/Api/LabelRest.php
r3357686 r3488939 349 349 * @package Vendidero/Shiptastic/DHL 350 350 */ 351 'phone' => apply_filters( 'woocommerce_shiptastic_dhl_label_api_communication_phone', '', $label ),351 'phone' => apply_filters( 'woocommerce_shiptastic_dhl_label_api_communication_phone', $shipment->is_shipping_international() ? $shipment->get_phone() : '', $label ), 352 352 /** 353 353 * Choose whether to transfer the email to DHL on creating a label. -
shiptastic-integration-for-dhl/tags/4.1.8/src/Install.php
r3313135 r3488939 20 20 if ( ! is_null( $current_version ) ) { 21 21 self::update( $current_version ); 22 } elseif ( Package::is_standalone() && ( $dhl = Package::get_dhl_shipping_provider() ) ) { 23 $dhl->activate(); // Activate on new install 22 } else { 23 if ( Package::is_standalone() && ( $dhl = Package::get_dhl_shipping_provider() ) ) { 24 $dhl->activate(); // Activate on new install 25 } 26 27 if ( \Vendidero\Shiptastic\DHL\Admin\Importer\DHL::is_available() ) { 28 \Vendidero\Shiptastic\DHL\Admin\Importer\DHL::import_settings(); 29 } 30 31 if ( \Vendidero\Shiptastic\DHL\Admin\Importer\Internetmarke::is_available() ) { 32 if ( Package::is_standalone() && ( $dp = Package::get_deutsche_post_shipping_provider() ) ) { 33 $dp->activate(); // Activate on new install 34 } 35 36 \Vendidero\Shiptastic\DHL\Admin\Importer\Internetmarke::import_settings(); 37 } 24 38 } 25 39 -
shiptastic-integration-for-dhl/tags/4.1.8/src/Package.php
r3432630 r3488939 33 33 * @var string 34 34 */ 35 const VERSION = '4.1. 7';35 const VERSION = '4.1.8'; 36 36 37 37 // These are all considered domestic by DHL -
shiptastic-integration-for-dhl/tags/4.1.8/src/ParcelServices.php
r3432630 r3488939 140 140 141 141 protected static function get_posted_data() { 142 $posted_data = array(); 143 142 144 if ( Package::is_rest_api_request() ) { 143 $posted_data = array();144 145 145 if ( WC()->session ) { 146 146 $posted_data['shipping_country'] = wc()->customer->get_shipping_country(); … … 156 156 $posted_data['current_pickup_location'] = wc()->customer->get_meta( 'pickup_location_code' ); 157 157 } 158 } else {158 } elseif ( isset( $_POST['post_data'] ) || isset( $_REQUEST['woocommerce-process-checkout-nonce'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing, WordPress.Security.NonceVerification.Recommended 159 159 $posted_keys = array( 160 160 'dhl_preferred_location_type' => '', -
shiptastic-integration-for-dhl/tags/4.1.8/vendor/composer/installed.php
r3432630 r3488939 2 2 'root' => array( 3 3 'name' => 'vendidero/shiptastic-integration-for-dhl', 4 'pretty_version' => '4.1. 7',5 'version' => '4.1. 7.0',4 'pretty_version' => '4.1.8', 5 'version' => '4.1.8.0', 6 6 'reference' => null, 7 7 'type' => 'wordpress-plugin', … … 42 42 ), 43 43 'vendidero/shiptastic-integration-for-dhl' => array( 44 'pretty_version' => '4.1. 7',45 'version' => '4.1. 7.0',44 'pretty_version' => '4.1.8', 45 'version' => '4.1.8.0', 46 46 'reference' => null, 47 47 'type' => 'wordpress-plugin', -
shiptastic-integration-for-dhl/tags/4.1.8/vendor/composer/jetpack_autoload_classmap.php
r3432630 r3488939 484 484 ), 485 485 'Vendidero\\Shiptastic\\DHL\\Admin\\Admin' => array( 486 'version' => '4.1. 7.0',486 'version' => '4.1.8.0', 487 487 'path' => $baseDir . '/src/Admin/Admin.php' 488 488 ), 489 489 'Vendidero\\Shiptastic\\DHL\\Admin\\Importer\\DHL' => array( 490 'version' => '4.1. 7.0',490 'version' => '4.1.8.0', 491 491 'path' => $baseDir . '/src/Admin/Importer/DHL.php' 492 492 ), 493 493 'Vendidero\\Shiptastic\\DHL\\Admin\\Importer\\Internetmarke' => array( 494 'version' => '4.1. 7.0',494 'version' => '4.1.8.0', 495 495 'path' => $baseDir . '/src/Admin/Importer/Internetmarke.php' 496 496 ), 497 497 'Vendidero\\Shiptastic\\DHL\\Ajax' => array( 498 'version' => '4.1. 7.0',498 'version' => '4.1.8.0', 499 499 'path' => $baseDir . '/src/Ajax.php' 500 500 ), 501 501 'Vendidero\\Shiptastic\\DHL\\Api\\ApiKeyAuth' => array( 502 'version' => '4.1. 7.0',502 'version' => '4.1.8.0', 503 503 'path' => $baseDir . '/src/Api/ApiKeyAuth.php' 504 504 ), 505 505 'Vendidero\\Shiptastic\\DHL\\Api\\AuthSoap' => array( 506 'version' => '4.1. 7.0',506 'version' => '4.1.8.0', 507 507 'path' => $baseDir . '/src/Api/AuthSoap.php' 508 508 ), 509 509 'Vendidero\\Shiptastic\\DHL\\Api\\BasicAuthPaket' => array( 510 'version' => '4.1. 7.0',510 'version' => '4.1.8.0', 511 511 'path' => $baseDir . '/src/Api/BasicAuthPaket.php' 512 512 ), 513 513 'Vendidero\\Shiptastic\\DHL\\Api\\BasicAuthParcelServices' => array( 514 'version' => '4.1. 7.0',514 'version' => '4.1.8.0', 515 515 'path' => $baseDir . '/src/Api/BasicAuthParcelServices.php' 516 516 ), 517 517 'Vendidero\\Shiptastic\\DHL\\Api\\BasicAuthParcelTracking' => array( 518 'version' => '4.1. 7.0',518 'version' => '4.1.8.0', 519 519 'path' => $baseDir . '/src/Api/BasicAuthParcelTracking.php' 520 520 ), 521 521 'Vendidero\\Shiptastic\\DHL\\Api\\ImProductList' => array( 522 'version' => '4.1. 7.0',522 'version' => '4.1.8.0', 523 523 'path' => $baseDir . '/src/Api/ImProductList.php' 524 524 ), 525 525 'Vendidero\\Shiptastic\\DHL\\Api\\ImProductsSoap' => array( 526 'version' => '4.1. 7.0',526 'version' => '4.1.8.0', 527 527 'path' => $baseDir . '/src/Api/ImProductsSoap.php' 528 528 ), 529 529 'Vendidero\\Shiptastic\\DHL\\Api\\Internetmarke' => array( 530 'version' => '4.1. 7.0',530 'version' => '4.1.8.0', 531 531 'path' => $baseDir . '/src/Api/Internetmarke.php' 532 532 ), 533 533 'Vendidero\\Shiptastic\\DHL\\Api\\InternetmarkeAuth' => array( 534 'version' => '4.1. 7.0',534 'version' => '4.1.8.0', 535 535 'path' => $baseDir . '/src/Api/InternetmarkeAuth.php' 536 536 ), 537 537 'Vendidero\\Shiptastic\\DHL\\Api\\InternetmarkeRest' => array( 538 'version' => '4.1. 7.0',538 'version' => '4.1.8.0', 539 539 'path' => $baseDir . '/src/Api/InternetmarkeRest.php' 540 540 ), 541 541 'Vendidero\\Shiptastic\\DHL\\Api\\LabelRest' => array( 542 'version' => '4.1. 7.0',542 'version' => '4.1.8.0', 543 543 'path' => $baseDir . '/src/Api/LabelRest.php' 544 544 ), 545 545 'Vendidero\\Shiptastic\\DHL\\Api\\LabelSoap' => array( 546 'version' => '4.1. 7.0',546 'version' => '4.1.8.0', 547 547 'path' => $baseDir . '/src/Api/LabelSoap.php' 548 548 ), 549 549 'Vendidero\\Shiptastic\\DHL\\Api\\LocationFinder' => array( 550 'version' => '4.1. 7.0',550 'version' => '4.1.8.0', 551 551 'path' => $baseDir . '/src/Api/LocationFinder.php' 552 552 ), 553 553 'Vendidero\\Shiptastic\\DHL\\Api\\MyAccount' => array( 554 'version' => '4.1. 7.0',554 'version' => '4.1.8.0', 555 555 'path' => $baseDir . '/src/Api/MyAccount.php' 556 556 ), 557 557 'Vendidero\\Shiptastic\\DHL\\Api\\OAuthPaket' => array( 558 'version' => '4.1. 7.0',558 'version' => '4.1.8.0', 559 559 'path' => $baseDir . '/src/Api/OAuthPaket.php' 560 560 ), 561 561 'Vendidero\\Shiptastic\\DHL\\Api\\Paket' => array( 562 'version' => '4.1. 7.0',562 'version' => '4.1.8.0', 563 563 'path' => $baseDir . '/src/Api/Paket.php' 564 564 ), 565 565 'Vendidero\\Shiptastic\\DHL\\Api\\PaketRest' => array( 566 'version' => '4.1. 7.0',566 'version' => '4.1.8.0', 567 567 'path' => $baseDir . '/src/Api/PaketRest.php' 568 568 ), 569 569 'Vendidero\\Shiptastic\\DHL\\Api\\ParcelServices' => array( 570 'version' => '4.1. 7.0',570 'version' => '4.1.8.0', 571 571 'path' => $baseDir . '/src/Api/ParcelServices.php' 572 572 ), 573 573 'Vendidero\\Shiptastic\\DHL\\Api\\ParcelTracking' => array( 574 'version' => '4.1. 7.0',574 'version' => '4.1.8.0', 575 575 'path' => $baseDir . '/src/Api/ParcelTracking.php' 576 576 ), 577 577 'Vendidero\\Shiptastic\\DHL\\Api\\ReturnRest' => array( 578 'version' => '4.1. 7.0',578 'version' => '4.1.8.0', 579 579 'path' => $baseDir . '/src/Api/ReturnRest.php' 580 580 ), 581 581 'Vendidero\\Shiptastic\\DHL\\Api\\Soap' => array( 582 'version' => '4.1. 7.0',582 'version' => '4.1.8.0', 583 583 'path' => $baseDir . '/src/Api/Soap.php' 584 584 ), 585 585 'Vendidero\\Shiptastic\\DHL\\Blocks\\Assets' => array( 586 'version' => '4.1. 7.0',586 'version' => '4.1.8.0', 587 587 'path' => $baseDir . '/src/Blocks/Assets.php' 588 588 ), 589 589 'Vendidero\\Shiptastic\\DHL\\Blocks\\Integrations\\PreferredServices' => array( 590 'version' => '4.1. 7.0',590 'version' => '4.1.8.0', 591 591 'path' => $baseDir . '/src/Blocks/Integrations/PreferredServices.php' 592 592 ), 593 593 'Vendidero\\Shiptastic\\DHL\\Blocks\\PreferredServices' => array( 594 'version' => '4.1. 7.0',594 'version' => '4.1.8.0', 595 595 'path' => $baseDir . '/src/Blocks/PreferredServices.php' 596 596 ), 597 597 'Vendidero\\Shiptastic\\DHL\\Bootstrap' => array( 598 'version' => '4.1. 7.0',598 'version' => '4.1.8.0', 599 599 'path' => $baseDir . '/src/Bootstrap.php' 600 600 ), 601 601 'Vendidero\\Shiptastic\\DHL\\Install' => array( 602 'version' => '4.1. 7.0',602 'version' => '4.1.8.0', 603 603 'path' => $baseDir . '/src/Install.php' 604 604 ), 605 605 'Vendidero\\Shiptastic\\DHL\\Label\\DHL' => array( 606 'version' => '4.1. 7.0',606 'version' => '4.1.8.0', 607 607 'path' => $baseDir . '/src/Label/DHL.php' 608 608 ), 609 609 'Vendidero\\Shiptastic\\DHL\\Label\\DHLInlayReturn' => array( 610 'version' => '4.1. 7.0',610 'version' => '4.1.8.0', 611 611 'path' => $baseDir . '/src/Label/DHLInlayReturn.php' 612 612 ), 613 613 'Vendidero\\Shiptastic\\DHL\\Label\\DHLReturn' => array( 614 'version' => '4.1. 7.0',614 'version' => '4.1.8.0', 615 615 'path' => $baseDir . '/src/Label/DHLReturn.php' 616 616 ), 617 617 'Vendidero\\Shiptastic\\DHL\\Label\\DeutschePost' => array( 618 'version' => '4.1. 7.0',618 'version' => '4.1.8.0', 619 619 'path' => $baseDir . '/src/Label/DeutschePost.php' 620 620 ), 621 621 'Vendidero\\Shiptastic\\DHL\\Label\\DeutschePostReturn' => array( 622 'version' => '4.1. 7.0',622 'version' => '4.1.8.0', 623 623 'path' => $baseDir . '/src/Label/DeutschePostReturn.php' 624 624 ), 625 625 'Vendidero\\Shiptastic\\DHL\\Label\\Label' => array( 626 'version' => '4.1. 7.0',626 'version' => '4.1.8.0', 627 627 'path' => $baseDir . '/src/Label/Label.php' 628 628 ), 629 629 'Vendidero\\Shiptastic\\DHL\\Label\\ReturnLabel' => array( 630 'version' => '4.1. 7.0',630 'version' => '4.1.8.0', 631 631 'path' => $baseDir . '/src/Label/ReturnLabel.php' 632 632 ), 633 633 'Vendidero\\Shiptastic\\DHL\\Order' => array( 634 'version' => '4.1. 7.0',634 'version' => '4.1.8.0', 635 635 'path' => $baseDir . '/src/Order.php' 636 636 ), 637 637 'Vendidero\\Shiptastic\\DHL\\Package' => array( 638 'version' => '4.1. 7.0',638 'version' => '4.1.8.0', 639 639 'path' => $baseDir . '/src/Package.php' 640 640 ), 641 641 'Vendidero\\Shiptastic\\DHL\\ParcelLocator' => array( 642 'version' => '4.1. 7.0',642 'version' => '4.1.8.0', 643 643 'path' => $baseDir . '/src/ParcelLocator.php' 644 644 ), 645 645 'Vendidero\\Shiptastic\\DHL\\ParcelServices' => array( 646 'version' => '4.1. 7.0',646 'version' => '4.1.8.0', 647 647 'path' => $baseDir . '/src/ParcelServices.php' 648 648 ), 649 649 'Vendidero\\Shiptastic\\DHL\\Product' => array( 650 'version' => '4.1. 7.0',650 'version' => '4.1.8.0', 651 651 'path' => $baseDir . '/src/Product.php' 652 652 ), 653 653 'Vendidero\\Shiptastic\\DHL\\ShippingProvider\\DHL' => array( 654 'version' => '4.1. 7.0',654 'version' => '4.1.8.0', 655 655 'path' => $baseDir . '/src/ShippingProvider/DHL.php' 656 656 ), 657 657 'Vendidero\\Shiptastic\\DHL\\ShippingProvider\\DeutschePost' => array( 658 'version' => '4.1. 7.0',658 'version' => '4.1.8.0', 659 659 'path' => $baseDir . '/src/ShippingProvider/DeutschePost.php' 660 660 ), 661 661 'Vendidero\\Shiptastic\\DHL\\ShippingProvider\\PickupDeliveryTrait' => array( 662 'version' => '4.1. 7.0',662 'version' => '4.1.8.0', 663 663 'path' => $baseDir . '/src/ShippingProvider/PickupDeliveryTrait.php' 664 664 ), 665 665 'Vendidero\\Shiptastic\\DHL\\ShippingProvider\\PickupLocation' => array( 666 'version' => '4.1. 7.0',666 'version' => '4.1.8.0', 667 667 'path' => $baseDir . '/src/ShippingProvider/PickupLocation.php' 668 668 ), 669 669 'Vendidero\\Shiptastic\\DHL\\ShippingProvider\\Services\\AdditionalInsurance' => array( 670 'version' => '4.1. 7.0',670 'version' => '4.1.8.0', 671 671 'path' => $baseDir . '/src/ShippingProvider/Services/AdditionalInsurance.php' 672 672 ), 673 673 'Vendidero\\Shiptastic\\DHL\\ShippingProvider\\Services\\CashOnDelivery' => array( 674 'version' => '4.1. 7.0',674 'version' => '4.1.8.0', 675 675 'path' => $baseDir . '/src/ShippingProvider/Services/CashOnDelivery.php' 676 676 ), 677 677 'Vendidero\\Shiptastic\\DHL\\ShippingProvider\\Services\\ClosestDropPoint' => array( 678 'version' => '4.1. 7.0',678 'version' => '4.1.8.0', 679 679 'path' => $baseDir . '/src/ShippingProvider/Services/ClosestDropPoint.php' 680 680 ), 681 681 'Vendidero\\Shiptastic\\DHL\\ShippingProvider\\Services\\DHLRetoure' => array( 682 'version' => '4.1. 7.0',682 'version' => '4.1.8.0', 683 683 'path' => $baseDir . '/src/ShippingProvider/Services/DHLRetoure.php' 684 684 ), 685 685 'Vendidero\\Shiptastic\\DHL\\ShippingProvider\\Services\\IdentCheck' => array( 686 'version' => '4.1. 7.0',686 'version' => '4.1.8.0', 687 687 'path' => $baseDir . '/src/ShippingProvider/Services/IdentCheck.php' 688 688 ), 689 689 'Vendidero\\Shiptastic\\DHL\\ShippingProvider\\Services\\PreferredDay' => array( 690 'version' => '4.1. 7.0',690 'version' => '4.1.8.0', 691 691 'path' => $baseDir . '/src/ShippingProvider/Services/PreferredDay.php' 692 692 ), 693 693 'Vendidero\\Shiptastic\\DHL\\ShippingProvider\\Services\\PreferredLocation' => array( 694 'version' => '4.1. 7.0',694 'version' => '4.1.8.0', 695 695 'path' => $baseDir . '/src/ShippingProvider/Services/PreferredLocation.php' 696 696 ), 697 697 'Vendidero\\Shiptastic\\DHL\\ShippingProvider\\Services\\PreferredNeighbour' => array( 698 'version' => '4.1. 7.0',698 'version' => '4.1.8.0', 699 699 'path' => $baseDir . '/src/ShippingProvider/Services/PreferredNeighbour.php' 700 700 ), 701 701 'Vendidero\\Shiptastic\\DHL\\ShippingProvider\\Services\\VisualCheckOfAge' => array( 702 'version' => '4.1. 7.0',702 'version' => '4.1.8.0', 703 703 'path' => $baseDir . '/src/ShippingProvider/Services/VisualCheckOfAge.php' 704 704 ), -
shiptastic-integration-for-dhl/trunk/readme.txt
r3432630 r3488939 3 3 Tags: shipping, UPS, shiptastic, woocommerce 4 4 Requires at least: 5.4 5 Tested up to: 6.96 Stable tag: 4.1. 75 Tested up to: 7.0 6 Stable tag: 4.1.8 7 7 Requires PHP: 7.0 8 8 License: GPLv3 … … 34 34 35 35 == Changelog == 36 = 4.1.8 = 37 * Improvement: Prevent side-effects in parcel services logic 38 * Improvement: Import DHL settings during first install 39 * Improvement: Transmit phone number by default for international labels 40 36 41 = 4.1.7 = 37 42 * Improvement: Register additional CDP countries -
shiptastic-integration-for-dhl/trunk/shiptastic-integration-for-dhl.php
r3432630 r3488939 6 6 * Author: vendidero 7 7 * Author URI: https://vendidero.de 8 * Version: 4.1. 78 * Version: 4.1.8 9 9 * Requires PHP: 7.0 10 10 * License: GPLv3 -
shiptastic-integration-for-dhl/trunk/src/Admin/Importer/DHL.php
r3313135 r3488939 7 7 defined( 'ABSPATH' ) || exit; 8 8 9 /**10 * WC_Admin class.11 */12 9 class DHL { 13 14 10 public static function is_available() { 15 11 $options = get_option( 'woocommerce_pr_dhl_paket_settings' ); 16 $imported = get_option( 'woocommerc _stc_dhl_import_finished' );12 $imported = get_option( 'woocommerce_stc_dhl_import_finished' ); 17 13 $user = ''; 18 14 … … 141 137 $dhl->save(); 142 138 139 update_option( 'woocommerce_stc_dhl_import_finished', 'yes', false ); 140 143 141 return true; 144 142 } 145 143 146 144 public static function import_order_data( $limit = 10, $offset = 0 ) { 147 148 145 $orders = wc_get_orders( 149 146 array( … … 158 155 if ( ! empty( $orders ) ) { 159 156 foreach ( $orders as $order ) { 160 161 157 if ( ! $order->get_meta( '_shipping_address_type' ) ) { 162 163 158 // Update order pickup type from official DHL plugin 164 159 if ( self::order_has_pickup( $order ) ) { 165 166 160 $order->update_meta_data( '_shipping_address_type', 'dhl' ); 167 161 $order->update_meta_data( '_shipping_dhl_postnumber', $order->get_meta( '_shipping_dhl_postnum' ) ); -
shiptastic-integration-for-dhl/trunk/src/Admin/Importer/Internetmarke.php
r3313135 r3488939 50 50 51 51 $deutsche_post->save(); 52 53 update_option( 'woocommerce_stc_internetmarke_import_finished', 'yes', false ); 54 52 55 return true; 53 56 } -
shiptastic-integration-for-dhl/trunk/src/Api/LabelRest.php
r3357686 r3488939 349 349 * @package Vendidero/Shiptastic/DHL 350 350 */ 351 'phone' => apply_filters( 'woocommerce_shiptastic_dhl_label_api_communication_phone', '', $label ),351 'phone' => apply_filters( 'woocommerce_shiptastic_dhl_label_api_communication_phone', $shipment->is_shipping_international() ? $shipment->get_phone() : '', $label ), 352 352 /** 353 353 * Choose whether to transfer the email to DHL on creating a label. -
shiptastic-integration-for-dhl/trunk/src/Install.php
r3313135 r3488939 20 20 if ( ! is_null( $current_version ) ) { 21 21 self::update( $current_version ); 22 } elseif ( Package::is_standalone() && ( $dhl = Package::get_dhl_shipping_provider() ) ) { 23 $dhl->activate(); // Activate on new install 22 } else { 23 if ( Package::is_standalone() && ( $dhl = Package::get_dhl_shipping_provider() ) ) { 24 $dhl->activate(); // Activate on new install 25 } 26 27 if ( \Vendidero\Shiptastic\DHL\Admin\Importer\DHL::is_available() ) { 28 \Vendidero\Shiptastic\DHL\Admin\Importer\DHL::import_settings(); 29 } 30 31 if ( \Vendidero\Shiptastic\DHL\Admin\Importer\Internetmarke::is_available() ) { 32 if ( Package::is_standalone() && ( $dp = Package::get_deutsche_post_shipping_provider() ) ) { 33 $dp->activate(); // Activate on new install 34 } 35 36 \Vendidero\Shiptastic\DHL\Admin\Importer\Internetmarke::import_settings(); 37 } 24 38 } 25 39 -
shiptastic-integration-for-dhl/trunk/src/Package.php
r3432630 r3488939 33 33 * @var string 34 34 */ 35 const VERSION = '4.1. 7';35 const VERSION = '4.1.8'; 36 36 37 37 // These are all considered domestic by DHL -
shiptastic-integration-for-dhl/trunk/src/ParcelServices.php
r3432630 r3488939 140 140 141 141 protected static function get_posted_data() { 142 $posted_data = array(); 143 142 144 if ( Package::is_rest_api_request() ) { 143 $posted_data = array();144 145 145 if ( WC()->session ) { 146 146 $posted_data['shipping_country'] = wc()->customer->get_shipping_country(); … … 156 156 $posted_data['current_pickup_location'] = wc()->customer->get_meta( 'pickup_location_code' ); 157 157 } 158 } else {158 } elseif ( isset( $_POST['post_data'] ) || isset( $_REQUEST['woocommerce-process-checkout-nonce'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing, WordPress.Security.NonceVerification.Recommended 159 159 $posted_keys = array( 160 160 'dhl_preferred_location_type' => '', -
shiptastic-integration-for-dhl/trunk/vendor/composer/installed.php
r3432630 r3488939 2 2 'root' => array( 3 3 'name' => 'vendidero/shiptastic-integration-for-dhl', 4 'pretty_version' => '4.1. 7',5 'version' => '4.1. 7.0',4 'pretty_version' => '4.1.8', 5 'version' => '4.1.8.0', 6 6 'reference' => null, 7 7 'type' => 'wordpress-plugin', … … 42 42 ), 43 43 'vendidero/shiptastic-integration-for-dhl' => array( 44 'pretty_version' => '4.1. 7',45 'version' => '4.1. 7.0',44 'pretty_version' => '4.1.8', 45 'version' => '4.1.8.0', 46 46 'reference' => null, 47 47 'type' => 'wordpress-plugin', -
shiptastic-integration-for-dhl/trunk/vendor/composer/jetpack_autoload_classmap.php
r3432630 r3488939 484 484 ), 485 485 'Vendidero\\Shiptastic\\DHL\\Admin\\Admin' => array( 486 'version' => '4.1. 7.0',486 'version' => '4.1.8.0', 487 487 'path' => $baseDir . '/src/Admin/Admin.php' 488 488 ), 489 489 'Vendidero\\Shiptastic\\DHL\\Admin\\Importer\\DHL' => array( 490 'version' => '4.1. 7.0',490 'version' => '4.1.8.0', 491 491 'path' => $baseDir . '/src/Admin/Importer/DHL.php' 492 492 ), 493 493 'Vendidero\\Shiptastic\\DHL\\Admin\\Importer\\Internetmarke' => array( 494 'version' => '4.1. 7.0',494 'version' => '4.1.8.0', 495 495 'path' => $baseDir . '/src/Admin/Importer/Internetmarke.php' 496 496 ), 497 497 'Vendidero\\Shiptastic\\DHL\\Ajax' => array( 498 'version' => '4.1. 7.0',498 'version' => '4.1.8.0', 499 499 'path' => $baseDir . '/src/Ajax.php' 500 500 ), 501 501 'Vendidero\\Shiptastic\\DHL\\Api\\ApiKeyAuth' => array( 502 'version' => '4.1. 7.0',502 'version' => '4.1.8.0', 503 503 'path' => $baseDir . '/src/Api/ApiKeyAuth.php' 504 504 ), 505 505 'Vendidero\\Shiptastic\\DHL\\Api\\AuthSoap' => array( 506 'version' => '4.1. 7.0',506 'version' => '4.1.8.0', 507 507 'path' => $baseDir . '/src/Api/AuthSoap.php' 508 508 ), 509 509 'Vendidero\\Shiptastic\\DHL\\Api\\BasicAuthPaket' => array( 510 'version' => '4.1. 7.0',510 'version' => '4.1.8.0', 511 511 'path' => $baseDir . '/src/Api/BasicAuthPaket.php' 512 512 ), 513 513 'Vendidero\\Shiptastic\\DHL\\Api\\BasicAuthParcelServices' => array( 514 'version' => '4.1. 7.0',514 'version' => '4.1.8.0', 515 515 'path' => $baseDir . '/src/Api/BasicAuthParcelServices.php' 516 516 ), 517 517 'Vendidero\\Shiptastic\\DHL\\Api\\BasicAuthParcelTracking' => array( 518 'version' => '4.1. 7.0',518 'version' => '4.1.8.0', 519 519 'path' => $baseDir . '/src/Api/BasicAuthParcelTracking.php' 520 520 ), 521 521 'Vendidero\\Shiptastic\\DHL\\Api\\ImProductList' => array( 522 'version' => '4.1. 7.0',522 'version' => '4.1.8.0', 523 523 'path' => $baseDir . '/src/Api/ImProductList.php' 524 524 ), 525 525 'Vendidero\\Shiptastic\\DHL\\Api\\ImProductsSoap' => array( 526 'version' => '4.1. 7.0',526 'version' => '4.1.8.0', 527 527 'path' => $baseDir . '/src/Api/ImProductsSoap.php' 528 528 ), 529 529 'Vendidero\\Shiptastic\\DHL\\Api\\Internetmarke' => array( 530 'version' => '4.1. 7.0',530 'version' => '4.1.8.0', 531 531 'path' => $baseDir . '/src/Api/Internetmarke.php' 532 532 ), 533 533 'Vendidero\\Shiptastic\\DHL\\Api\\InternetmarkeAuth' => array( 534 'version' => '4.1. 7.0',534 'version' => '4.1.8.0', 535 535 'path' => $baseDir . '/src/Api/InternetmarkeAuth.php' 536 536 ), 537 537 'Vendidero\\Shiptastic\\DHL\\Api\\InternetmarkeRest' => array( 538 'version' => '4.1. 7.0',538 'version' => '4.1.8.0', 539 539 'path' => $baseDir . '/src/Api/InternetmarkeRest.php' 540 540 ), 541 541 'Vendidero\\Shiptastic\\DHL\\Api\\LabelRest' => array( 542 'version' => '4.1. 7.0',542 'version' => '4.1.8.0', 543 543 'path' => $baseDir . '/src/Api/LabelRest.php' 544 544 ), 545 545 'Vendidero\\Shiptastic\\DHL\\Api\\LabelSoap' => array( 546 'version' => '4.1. 7.0',546 'version' => '4.1.8.0', 547 547 'path' => $baseDir . '/src/Api/LabelSoap.php' 548 548 ), 549 549 'Vendidero\\Shiptastic\\DHL\\Api\\LocationFinder' => array( 550 'version' => '4.1. 7.0',550 'version' => '4.1.8.0', 551 551 'path' => $baseDir . '/src/Api/LocationFinder.php' 552 552 ), 553 553 'Vendidero\\Shiptastic\\DHL\\Api\\MyAccount' => array( 554 'version' => '4.1. 7.0',554 'version' => '4.1.8.0', 555 555 'path' => $baseDir . '/src/Api/MyAccount.php' 556 556 ), 557 557 'Vendidero\\Shiptastic\\DHL\\Api\\OAuthPaket' => array( 558 'version' => '4.1. 7.0',558 'version' => '4.1.8.0', 559 559 'path' => $baseDir . '/src/Api/OAuthPaket.php' 560 560 ), 561 561 'Vendidero\\Shiptastic\\DHL\\Api\\Paket' => array( 562 'version' => '4.1. 7.0',562 'version' => '4.1.8.0', 563 563 'path' => $baseDir . '/src/Api/Paket.php' 564 564 ), 565 565 'Vendidero\\Shiptastic\\DHL\\Api\\PaketRest' => array( 566 'version' => '4.1. 7.0',566 'version' => '4.1.8.0', 567 567 'path' => $baseDir . '/src/Api/PaketRest.php' 568 568 ), 569 569 'Vendidero\\Shiptastic\\DHL\\Api\\ParcelServices' => array( 570 'version' => '4.1. 7.0',570 'version' => '4.1.8.0', 571 571 'path' => $baseDir . '/src/Api/ParcelServices.php' 572 572 ), 573 573 'Vendidero\\Shiptastic\\DHL\\Api\\ParcelTracking' => array( 574 'version' => '4.1. 7.0',574 'version' => '4.1.8.0', 575 575 'path' => $baseDir . '/src/Api/ParcelTracking.php' 576 576 ), 577 577 'Vendidero\\Shiptastic\\DHL\\Api\\ReturnRest' => array( 578 'version' => '4.1. 7.0',578 'version' => '4.1.8.0', 579 579 'path' => $baseDir . '/src/Api/ReturnRest.php' 580 580 ), 581 581 'Vendidero\\Shiptastic\\DHL\\Api\\Soap' => array( 582 'version' => '4.1. 7.0',582 'version' => '4.1.8.0', 583 583 'path' => $baseDir . '/src/Api/Soap.php' 584 584 ), 585 585 'Vendidero\\Shiptastic\\DHL\\Blocks\\Assets' => array( 586 'version' => '4.1. 7.0',586 'version' => '4.1.8.0', 587 587 'path' => $baseDir . '/src/Blocks/Assets.php' 588 588 ), 589 589 'Vendidero\\Shiptastic\\DHL\\Blocks\\Integrations\\PreferredServices' => array( 590 'version' => '4.1. 7.0',590 'version' => '4.1.8.0', 591 591 'path' => $baseDir . '/src/Blocks/Integrations/PreferredServices.php' 592 592 ), 593 593 'Vendidero\\Shiptastic\\DHL\\Blocks\\PreferredServices' => array( 594 'version' => '4.1. 7.0',594 'version' => '4.1.8.0', 595 595 'path' => $baseDir . '/src/Blocks/PreferredServices.php' 596 596 ), 597 597 'Vendidero\\Shiptastic\\DHL\\Bootstrap' => array( 598 'version' => '4.1. 7.0',598 'version' => '4.1.8.0', 599 599 'path' => $baseDir . '/src/Bootstrap.php' 600 600 ), 601 601 'Vendidero\\Shiptastic\\DHL\\Install' => array( 602 'version' => '4.1. 7.0',602 'version' => '4.1.8.0', 603 603 'path' => $baseDir . '/src/Install.php' 604 604 ), 605 605 'Vendidero\\Shiptastic\\DHL\\Label\\DHL' => array( 606 'version' => '4.1. 7.0',606 'version' => '4.1.8.0', 607 607 'path' => $baseDir . '/src/Label/DHL.php' 608 608 ), 609 609 'Vendidero\\Shiptastic\\DHL\\Label\\DHLInlayReturn' => array( 610 'version' => '4.1. 7.0',610 'version' => '4.1.8.0', 611 611 'path' => $baseDir . '/src/Label/DHLInlayReturn.php' 612 612 ), 613 613 'Vendidero\\Shiptastic\\DHL\\Label\\DHLReturn' => array( 614 'version' => '4.1. 7.0',614 'version' => '4.1.8.0', 615 615 'path' => $baseDir . '/src/Label/DHLReturn.php' 616 616 ), 617 617 'Vendidero\\Shiptastic\\DHL\\Label\\DeutschePost' => array( 618 'version' => '4.1. 7.0',618 'version' => '4.1.8.0', 619 619 'path' => $baseDir . '/src/Label/DeutschePost.php' 620 620 ), 621 621 'Vendidero\\Shiptastic\\DHL\\Label\\DeutschePostReturn' => array( 622 'version' => '4.1. 7.0',622 'version' => '4.1.8.0', 623 623 'path' => $baseDir . '/src/Label/DeutschePostReturn.php' 624 624 ), 625 625 'Vendidero\\Shiptastic\\DHL\\Label\\Label' => array( 626 'version' => '4.1. 7.0',626 'version' => '4.1.8.0', 627 627 'path' => $baseDir . '/src/Label/Label.php' 628 628 ), 629 629 'Vendidero\\Shiptastic\\DHL\\Label\\ReturnLabel' => array( 630 'version' => '4.1. 7.0',630 'version' => '4.1.8.0', 631 631 'path' => $baseDir . '/src/Label/ReturnLabel.php' 632 632 ), 633 633 'Vendidero\\Shiptastic\\DHL\\Order' => array( 634 'version' => '4.1. 7.0',634 'version' => '4.1.8.0', 635 635 'path' => $baseDir . '/src/Order.php' 636 636 ), 637 637 'Vendidero\\Shiptastic\\DHL\\Package' => array( 638 'version' => '4.1. 7.0',638 'version' => '4.1.8.0', 639 639 'path' => $baseDir . '/src/Package.php' 640 640 ), 641 641 'Vendidero\\Shiptastic\\DHL\\ParcelLocator' => array( 642 'version' => '4.1. 7.0',642 'version' => '4.1.8.0', 643 643 'path' => $baseDir . '/src/ParcelLocator.php' 644 644 ), 645 645 'Vendidero\\Shiptastic\\DHL\\ParcelServices' => array( 646 'version' => '4.1. 7.0',646 'version' => '4.1.8.0', 647 647 'path' => $baseDir . '/src/ParcelServices.php' 648 648 ), 649 649 'Vendidero\\Shiptastic\\DHL\\Product' => array( 650 'version' => '4.1. 7.0',650 'version' => '4.1.8.0', 651 651 'path' => $baseDir . '/src/Product.php' 652 652 ), 653 653 'Vendidero\\Shiptastic\\DHL\\ShippingProvider\\DHL' => array( 654 'version' => '4.1. 7.0',654 'version' => '4.1.8.0', 655 655 'path' => $baseDir . '/src/ShippingProvider/DHL.php' 656 656 ), 657 657 'Vendidero\\Shiptastic\\DHL\\ShippingProvider\\DeutschePost' => array( 658 'version' => '4.1. 7.0',658 'version' => '4.1.8.0', 659 659 'path' => $baseDir . '/src/ShippingProvider/DeutschePost.php' 660 660 ), 661 661 'Vendidero\\Shiptastic\\DHL\\ShippingProvider\\PickupDeliveryTrait' => array( 662 'version' => '4.1. 7.0',662 'version' => '4.1.8.0', 663 663 'path' => $baseDir . '/src/ShippingProvider/PickupDeliveryTrait.php' 664 664 ), 665 665 'Vendidero\\Shiptastic\\DHL\\ShippingProvider\\PickupLocation' => array( 666 'version' => '4.1. 7.0',666 'version' => '4.1.8.0', 667 667 'path' => $baseDir . '/src/ShippingProvider/PickupLocation.php' 668 668 ), 669 669 'Vendidero\\Shiptastic\\DHL\\ShippingProvider\\Services\\AdditionalInsurance' => array( 670 'version' => '4.1. 7.0',670 'version' => '4.1.8.0', 671 671 'path' => $baseDir . '/src/ShippingProvider/Services/AdditionalInsurance.php' 672 672 ), 673 673 'Vendidero\\Shiptastic\\DHL\\ShippingProvider\\Services\\CashOnDelivery' => array( 674 'version' => '4.1. 7.0',674 'version' => '4.1.8.0', 675 675 'path' => $baseDir . '/src/ShippingProvider/Services/CashOnDelivery.php' 676 676 ), 677 677 'Vendidero\\Shiptastic\\DHL\\ShippingProvider\\Services\\ClosestDropPoint' => array( 678 'version' => '4.1. 7.0',678 'version' => '4.1.8.0', 679 679 'path' => $baseDir . '/src/ShippingProvider/Services/ClosestDropPoint.php' 680 680 ), 681 681 'Vendidero\\Shiptastic\\DHL\\ShippingProvider\\Services\\DHLRetoure' => array( 682 'version' => '4.1. 7.0',682 'version' => '4.1.8.0', 683 683 'path' => $baseDir . '/src/ShippingProvider/Services/DHLRetoure.php' 684 684 ), 685 685 'Vendidero\\Shiptastic\\DHL\\ShippingProvider\\Services\\IdentCheck' => array( 686 'version' => '4.1. 7.0',686 'version' => '4.1.8.0', 687 687 'path' => $baseDir . '/src/ShippingProvider/Services/IdentCheck.php' 688 688 ), 689 689 'Vendidero\\Shiptastic\\DHL\\ShippingProvider\\Services\\PreferredDay' => array( 690 'version' => '4.1. 7.0',690 'version' => '4.1.8.0', 691 691 'path' => $baseDir . '/src/ShippingProvider/Services/PreferredDay.php' 692 692 ), 693 693 'Vendidero\\Shiptastic\\DHL\\ShippingProvider\\Services\\PreferredLocation' => array( 694 'version' => '4.1. 7.0',694 'version' => '4.1.8.0', 695 695 'path' => $baseDir . '/src/ShippingProvider/Services/PreferredLocation.php' 696 696 ), 697 697 'Vendidero\\Shiptastic\\DHL\\ShippingProvider\\Services\\PreferredNeighbour' => array( 698 'version' => '4.1. 7.0',698 'version' => '4.1.8.0', 699 699 'path' => $baseDir . '/src/ShippingProvider/Services/PreferredNeighbour.php' 700 700 ), 701 701 'Vendidero\\Shiptastic\\DHL\\ShippingProvider\\Services\\VisualCheckOfAge' => array( 702 'version' => '4.1. 7.0',702 'version' => '4.1.8.0', 703 703 'path' => $baseDir . '/src/ShippingProvider/Services/VisualCheckOfAge.php' 704 704 ),
Note: See TracChangeset
for help on using the changeset viewer.