Changeset 3300820
- Timestamp:
- 05/26/2025 02:38:49 PM (10 months ago)
- Location:
- sendcloud-connected-shipping
- Files:
-
- 133 added
- 36 edited
-
tags/1.0.11 (added)
-
tags/1.0.11/changelog.txt (added)
-
tags/1.0.11/composer.json (added)
-
tags/1.0.11/composer.lock (added)
-
tags/1.0.11/database (added)
-
tags/1.0.11/database/Exceptions (added)
-
tags/1.0.11/database/Exceptions/class-migration-exception.php (added)
-
tags/1.0.11/database/Migrations (added)
-
tags/1.0.11/database/Migrations/migration.v.1.0.0.php (added)
-
tags/1.0.11/database/Migrations/migration.v.1.0.1.php (added)
-
tags/1.0.11/database/Migrations/migration.v.1.0.11.php (added)
-
tags/1.0.11/database/Utility (added)
-
tags/1.0.11/database/Utility/class-migration-reader.php (added)
-
tags/1.0.11/database/class-abstract-migration.php (added)
-
tags/1.0.11/database/class-migrator.php (added)
-
tags/1.0.11/i18n (added)
-
tags/1.0.11/i18n/languages (added)
-
tags/1.0.11/i18n/languages/sendcloud-connected-shipping-de_DE.mo (added)
-
tags/1.0.11/i18n/languages/sendcloud-connected-shipping-de_DE.po (added)
-
tags/1.0.11/i18n/languages/sendcloud-connected-shipping-en_GB.mo (added)
-
tags/1.0.11/i18n/languages/sendcloud-connected-shipping-en_GB.po (added)
-
tags/1.0.11/i18n/languages/sendcloud-connected-shipping-en_US.mo (added)
-
tags/1.0.11/i18n/languages/sendcloud-connected-shipping-en_US.po (added)
-
tags/1.0.11/i18n/languages/sendcloud-connected-shipping-es_ES.mo (added)
-
tags/1.0.11/i18n/languages/sendcloud-connected-shipping-es_ES.po (added)
-
tags/1.0.11/i18n/languages/sendcloud-connected-shipping-fr_FR.mo (added)
-
tags/1.0.11/i18n/languages/sendcloud-connected-shipping-fr_FR.po (added)
-
tags/1.0.11/i18n/languages/sendcloud-connected-shipping-it_IT.mo (added)
-
tags/1.0.11/i18n/languages/sendcloud-connected-shipping-it_IT.po (added)
-
tags/1.0.11/i18n/languages/sendcloud-connected-shipping-nl_NL.mo (added)
-
tags/1.0.11/i18n/languages/sendcloud-connected-shipping-nl_NL.po (added)
-
tags/1.0.11/i18n/languages/sendcloud-connected-shipping.pot (added)
-
tags/1.0.11/includes (added)
-
tags/1.0.11/includes/Controllers (added)
-
tags/1.0.11/includes/Controllers/Api (added)
-
tags/1.0.11/includes/Controllers/Api/class-authorization.php (added)
-
tags/1.0.11/includes/Controllers/Api/class-base-wc-rest-controller.php (added)
-
tags/1.0.11/includes/Controllers/Api/class-integration-controller.php (added)
-
tags/1.0.11/includes/Controllers/Api/class-service-point-controller.php (added)
-
tags/1.0.11/includes/Controllers/Api/class-status-controller.php (added)
-
tags/1.0.11/includes/Controllers/Backend (added)
-
tags/1.0.11/includes/Controllers/Backend/class-connect-controller.php (added)
-
tags/1.0.11/includes/Controllers/Backend/class-migration-controller.php (added)
-
tags/1.0.11/includes/Controllers/Backend/class-support-controller.php (added)
-
tags/1.0.11/includes/Controllers/Backend/class-view-controller.php (added)
-
tags/1.0.11/includes/Controllers/Frontend (added)
-
tags/1.0.11/includes/Controllers/Frontend/class-base-controller.php (added)
-
tags/1.0.11/includes/Controllers/Frontend/class-oauth-complete-controller.php (added)
-
tags/1.0.11/includes/Controllers/Frontend/class-oauth-connect-controller.php (added)
-
tags/1.0.11/includes/Exceptions (added)
-
tags/1.0.11/includes/Exceptions/class-http-unsuccessful-response.php (added)
-
tags/1.0.11/includes/Exceptions/class-invalid-payload-exception.php (added)
-
tags/1.0.11/includes/Exceptions/class-missing-auth-data-exception.php (added)
-
tags/1.0.11/includes/Exceptions/class-missing-consumer-key-exception.php (added)
-
tags/1.0.11/includes/Exceptions/class-request-missing-parameters-exception.php (added)
-
tags/1.0.11/includes/HookHandlers (added)
-
tags/1.0.11/includes/HookHandlers/class-api-handler.php (added)
-
tags/1.0.11/includes/HookHandlers/class-plugin-disable-handler.php (added)
-
tags/1.0.11/includes/HookHandlers/class-product-handler.php (added)
-
tags/1.0.11/includes/Models (added)
-
tags/1.0.11/includes/Models/class-api-key.php (added)
-
tags/1.0.11/includes/Models/class-auth-data.php (added)
-
tags/1.0.11/includes/Models/class-deactivation-data.php (added)
-
tags/1.0.11/includes/Models/class-service-point-instance.php (added)
-
tags/1.0.11/includes/Models/class-service-point-meta.php (added)
-
tags/1.0.11/includes/Repositories (added)
-
tags/1.0.11/includes/Repositories/class-abstract-repository.php (added)
-
tags/1.0.11/includes/Repositories/class-api-key-repository.php (added)
-
tags/1.0.11/includes/Repositories/class-config-repository.php (added)
-
tags/1.0.11/includes/Repositories/class-order-repository.php (added)
-
tags/1.0.11/includes/Repositories/class-shipping-method-options-repository.php (added)
-
tags/1.0.11/includes/ServicePoint (added)
-
tags/1.0.11/includes/ServicePoint/Checkout (added)
-
tags/1.0.11/includes/ServicePoint/Checkout/class-checkout-block-handler.php (added)
-
tags/1.0.11/includes/ServicePoint/Checkout/class-checkout-handler.php (added)
-
tags/1.0.11/includes/ServicePoint/Shipping (added)
-
tags/1.0.11/includes/ServicePoint/Shipping/class-abstract-flat-rate-free-shipping-method.php (added)
-
tags/1.0.11/includes/ServicePoint/Shipping/class-service-point-shipping-method.php (added)
-
tags/1.0.11/includes/ServicePoint/class-email-handler.php (added)
-
tags/1.0.11/includes/ServicePoint/class-order-admin-handler.php (added)
-
tags/1.0.11/includes/Services (added)
-
tags/1.0.11/includes/Services/class-auth-service.php (added)
-
tags/1.0.11/includes/Services/class-config-service.php (added)
-
tags/1.0.11/includes/Services/class-connect-service.php (added)
-
tags/1.0.11/includes/Services/class-webhook-service.php (added)
-
tags/1.0.11/includes/Utility (added)
-
tags/1.0.11/includes/Utility/class-auth-code-generator.php (added)
-
tags/1.0.11/includes/Utility/class-base64-url-encoder.php (added)
-
tags/1.0.11/includes/Utility/class-database.php (added)
-
tags/1.0.11/includes/Utility/class-http-client.php (added)
-
tags/1.0.11/includes/Utility/class-logger-factory.php (added)
-
tags/1.0.11/includes/Utility/class-logger.php (added)
-
tags/1.0.11/includes/Utility/class-response.php (added)
-
tags/1.0.11/includes/Utility/class-shop-helper.php (added)
-
tags/1.0.11/includes/Utility/class-version-utility.php (added)
-
tags/1.0.11/includes/Utility/class-view.php (added)
-
tags/1.0.11/includes/class-sendcloud.php (added)
-
tags/1.0.11/readme.txt (added)
-
tags/1.0.11/resources (added)
-
tags/1.0.11/resources/css (added)
-
tags/1.0.11/resources/css/sendcloud.css (added)
-
tags/1.0.11/resources/js (added)
-
tags/1.0.11/resources/js/sendcloud.page.js (added)
-
tags/1.0.11/resources/js/service-point-block.js (added)
-
tags/1.0.11/resources/views (added)
-
tags/1.0.11/resources/views/plugin (added)
-
tags/1.0.11/resources/views/plugin/deactivation-notice.php (added)
-
tags/1.0.11/resources/views/service-point (added)
-
tags/1.0.11/resources/views/service-point/checkout (added)
-
tags/1.0.11/resources/views/service-point/checkout/service-point-carriers.php (added)
-
tags/1.0.11/resources/views/service-point/email-template.php (added)
-
tags/1.0.11/resources/views/service-point/order-admin.php (added)
-
tags/1.0.11/resources/views/service-point/order-confirmation-page.php (added)
-
tags/1.0.11/resources/views/wc-settings (added)
-
tags/1.0.11/resources/views/wc-settings/sendcloud-page.php (added)
-
tags/1.0.11/sendcloud-connected-shipping.php (added)
-
tags/1.0.11/uninstall.php (added)
-
tags/1.0.11/vendor (added)
-
tags/1.0.11/vendor/autoload.php (added)
-
tags/1.0.11/vendor/composer (added)
-
tags/1.0.11/vendor/composer/ClassLoader.php (added)
-
tags/1.0.11/vendor/composer/InstalledVersions.php (added)
-
tags/1.0.11/vendor/composer/LICENSE (added)
-
tags/1.0.11/vendor/composer/autoload_classmap.php (added)
-
tags/1.0.11/vendor/composer/autoload_namespaces.php (added)
-
tags/1.0.11/vendor/composer/autoload_psr4.php (added)
-
tags/1.0.11/vendor/composer/autoload_real.php (added)
-
tags/1.0.11/vendor/composer/autoload_static.php (added)
-
tags/1.0.11/vendor/composer/installed.json (added)
-
tags/1.0.11/vendor/composer/installed.php (added)
-
tags/1.0.11/vendor/composer/platform_check.php (added)
-
trunk/changelog.txt (modified) (1 diff)
-
trunk/composer.lock (modified) (2 diffs)
-
trunk/database/Migrations/migration.v.1.0.11.php (added)
-
trunk/i18n/languages/sendcloud-connected-shipping-de_DE.mo (modified) (previous)
-
trunk/i18n/languages/sendcloud-connected-shipping-de_DE.po (modified) (3 diffs)
-
trunk/i18n/languages/sendcloud-connected-shipping-en_GB.mo (modified) (previous)
-
trunk/i18n/languages/sendcloud-connected-shipping-en_GB.po (modified) (4 diffs)
-
trunk/i18n/languages/sendcloud-connected-shipping-en_US.mo (modified) (previous)
-
trunk/i18n/languages/sendcloud-connected-shipping-en_US.po (modified) (1 diff)
-
trunk/i18n/languages/sendcloud-connected-shipping-es_ES.mo (modified) (previous)
-
trunk/i18n/languages/sendcloud-connected-shipping-es_ES.po (modified) (5 diffs)
-
trunk/i18n/languages/sendcloud-connected-shipping-fr_FR.mo (modified) (previous)
-
trunk/i18n/languages/sendcloud-connected-shipping-fr_FR.po (modified) (1 diff)
-
trunk/i18n/languages/sendcloud-connected-shipping-it_IT.mo (modified) (previous)
-
trunk/i18n/languages/sendcloud-connected-shipping-it_IT.po (modified) (1 diff)
-
trunk/i18n/languages/sendcloud-connected-shipping-nl_NL.mo (modified) (previous)
-
trunk/i18n/languages/sendcloud-connected-shipping-nl_NL.po (modified) (1 diff)
-
trunk/includes/Repositories/class-api-key-repository.php (modified) (4 diffs)
-
trunk/includes/ServicePoint/Checkout/class-checkout-block-handler.php (modified) (5 diffs)
-
trunk/includes/ServicePoint/Checkout/class-checkout-handler.php (modified) (1 diff)
-
trunk/includes/class-sendcloud.php (modified) (1 diff)
-
trunk/readme.txt (modified) (3 diffs)
-
trunk/resources/css/sendcloud.css (modified) (2 diffs)
-
trunk/resources/js/sendcloud.page.js (modified) (2 diffs)
-
trunk/resources/js/service-point-block.js (added)
-
trunk/resources/views/wc-settings/sendcloud-page.php (modified) (1 diff)
-
trunk/sendcloud-connected-shipping.php (modified) (2 diffs)
-
trunk/uninstall.php (modified) (2 diffs)
-
trunk/vendor/autoload.php (modified) (1 diff)
-
trunk/vendor/composer/ClassLoader.php (modified) (25 diffs)
-
trunk/vendor/composer/InstalledVersions.php (modified) (12 diffs)
-
trunk/vendor/composer/LICENSE (modified) (2 diffs)
-
trunk/vendor/composer/autoload_classmap.php (modified) (2 diffs)
-
trunk/vendor/composer/autoload_namespaces.php (modified) (1 diff)
-
trunk/vendor/composer/autoload_psr4.php (modified) (1 diff)
-
trunk/vendor/composer/autoload_real.php (modified) (2 diffs)
-
trunk/vendor/composer/autoload_static.php (modified) (3 diffs)
-
trunk/vendor/composer/installed.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
sendcloud-connected-shipping/trunk/changelog.txt
r3293141 r3300820 1 1 *** WooCommerce Sendcloud | The all-in-one shipping platform Changelog *** 2 3 = 2025-05-26 - version 1.0.11 = 4 * Changed sendcloud user creation logic 5 6 = 2025-05-20 - version 1.0.10 = 7 * Added agreement checkbox on plugin installation page 8 9 = 2025-05-15 - version 1.0.9 = 10 * Fixed issue with creating order with service point method when using block checkout 2 11 3 12 = 2025-05-14 - version 1.0.8 = -
sendcloud-connected-shipping/trunk/composer.lock
r3266337 r3300820 10 10 "aliases": [], 11 11 "minimum-stability": "stable", 12 "stability-flags": [],12 "stability-flags": {}, 13 13 "prefer-stable": false, 14 14 "prefer-lowest": false, … … 17 17 "ext-json": "*" 18 18 }, 19 "platform-dev": [],20 "plugin-api-version": "2. 2.0"19 "platform-dev": {}, 20 "plugin-api-version": "2.6.0" 21 21 } -
sendcloud-connected-shipping/trunk/i18n/languages/sendcloud-connected-shipping-de_DE.po
r3266337 r3300820 1 1 msgid "" 2 2 msgstr "" 3 "Project-Id-Version: \n" 4 "POT-Creation-Date: \n" 5 "PO-Revision-Date: \n" 6 "Last-Translator: \n" 7 "Language-Team: \n" 3 8 "Language: de_DE\n" 4 9 "MIME-Version: 1.0\n" … … 6 11 "Content-Transfer-Encoding: 8bit\n" 7 12 "Plural-Forms: nplurals=2; plural=(n != 1);\n" 8 "X-Generator: P hrase (phrase.com)\n"13 "X-Generator: Poedit 3.6\n" 9 14 10 15 #: includes/ServicePoint/Shipping/class-sc-service-point-shipping-method.php:62 … … 971 976 msgstr "Willst du eine Einstellung ändern?" 972 977 973 #: resources/views/wc-settings/sendcloud-page.php:210 974 msgid "Want to see your WooCommerce orders in the Sendcloud Panel?" 975 msgstr "Du möchtest deine WooCommerce-Bestellungen in Sendcloud sehen?" 978 #: resources/views/wc-settings/sendcloud-page.php:31 979 msgid "This plugin will create a new user named sendcloud_api" 980 msgstr "Durch die Verbindung erstellt dieses Plugin einen neuen Benutzer namens <code>sendcloud_api_***</code> mit der Rolle <a href=\"https://woocommerce.com/posts/a-guide-to-woocommerce-user-roles-permissions-and-security/#section-2\" target=\"_blank\">Shop-Manager</a>. Ein WooCommerce-REST-API-Schlüssel mit Lese- und Schreibberechtigungen wird generiert, um eine sichere Verbindung mit Sendcloud herzustellen" 981 982 msgid "I acknowledge and agree" 983 msgstr "Ich bestätige und stimme der Erstellung dieses Benutzers und des API-Schlüssels zu." 976 984 977 985 msgid "Warehouse" -
sendcloud-connected-shipping/trunk/i18n/languages/sendcloud-connected-shipping-en_GB.po
r3266337 r3300820 1 1 msgid "" 2 2 msgstr "" 3 "Project-Id-Version: \n" 4 "POT-Creation-Date: \n" 5 "PO-Revision-Date: \n" 6 "Last-Translator: \n" 7 "Language-Team: \n" 3 8 "Language: en_GB\n" 4 9 "MIME-Version: 1.0\n" … … 6 11 "Content-Transfer-Encoding: 8bit\n" 7 12 "Plural-Forms: nplurals=2; plural=(n != 1);\n" 8 "X-Generator: P hrase (phrase.com)\n"13 "X-Generator: Poedit 3.6\n" 9 14 10 15 #: includes/ServicePoint/Shipping/class-sc-service-point-shipping-method.php:62 … … 691 696 #: resources/views/wc-settings/sendcloud-page.php:190 692 697 msgid "Sendcloud Integration" 693 msgstr " v"698 msgstr "Sendcloud Integration" 694 699 695 700 msgid "Sendcloud is amazing!" … … 971 976 msgstr "Want to change any setting?" 972 977 973 #: resources/views/wc-settings/sendcloud-page.php:210 974 msgid "Want to see your WooCommerce orders in the Sendcloud Panel?" 975 msgstr "Want to see your WooCommerce orders in the Sendcloud Panel?" 978 #: resources/views/wc-settings/sendcloud-page.php:31 979 msgid "This plugin will create a new user named sendcloud_api" 980 msgstr "By connecting, this plugin will create a new user named <code>sendcloud_api_***</code> with the <a href=\"https://woocommerce.com/posts/a-guide-to-woocommerce-user-roles-permissions-and-security/#section-2\" target=\"_blank\">Shop Manager</a> role. A WooCommerce REST API key with read and write permissions will be generated to establish a secure connection with Sendcloud" 981 982 msgid "I acknowledge and agree" 983 msgstr "I acknowledge and agree to the creation of this user and API key" 976 984 977 985 msgid "Warehouse" -
sendcloud-connected-shipping/trunk/i18n/languages/sendcloud-connected-shipping-en_US.po
r3266337 r3300820 966 966 msgstr "Want to change any setting?" 967 967 968 #: resources/views/wc-settings/sendcloud-page.php:210 969 msgid "Want to see your WooCommerce orders in the Sendcloud Panel?" 970 msgstr "Want to see your WooCommerce orders in the Sendcloud Panel?" 968 #: resources/views/wc-settings/sendcloud-page.php:31 969 msgid "This plugin will create a new user named sendcloud_api" 970 msgstr "By connecting, this plugin will create a new user named <code>sendcloud_api_***</code> with the <a href=\"https://woocommerce.com/posts/a-guide-to-woocommerce-user-roles-permissions-and-security/#section-2\" target=\"_blank\">Shop Manager</a> role. A WooCommerce REST API key with read and write permissions will be generated to establish a secure connection with Sendcloud" 971 972 msgid "I acknowledge and agree" 973 msgstr "I acknowledge and agree to the creation of this user and API key" 971 974 972 975 msgid "Warehouse" -
sendcloud-connected-shipping/trunk/i18n/languages/sendcloud-connected-shipping-es_ES.po
r3266337 r3300820 1 1 msgid "" 2 2 msgstr "" 3 "Project-Id-Version: \n" 4 "POT-Creation-Date: \n" 5 "PO-Revision-Date: \n" 6 "Last-Translator: \n" 7 "Language-Team: \n" 3 8 "Language: es_ES\n" 4 9 "MIME-Version: 1.0\n" … … 6 11 "Content-Transfer-Encoding: 8bit\n" 7 12 "Plural-Forms: nplurals=2; plural=(n != 1);\n" 8 "X-Generator: P hrase (phrase.com)\n"13 "X-Generator: Poedit 3.6\n" 9 14 10 15 #: includes/ServicePoint/Shipping/class-sc-service-point-shipping-method.php:62 … … 753 758 msgstr "" 754 759 "La entrega en puntos de servicio es compatible con la versión anterior, por favor, configura la entrega en puntos de servicio a través del Checkout Dinámico en <a href=\"https://panel.sendcloud.sc/v2/checkout/configurations\" target=\"_blank\">Sendcloud</a>.\n" 755 "\n" 756 "" 760 " " 757 761 758 762 msgid "Service point delivery is supported for legacy purposes, please set up Service point delivery via Dynamic Checkout in Sendcloud." … … 824 828 #: resources/views/wc-settings/sendcloud-page.php:100 825 829 msgid "SHIPPING RATE" 826 msgstr "" 827 "TARIFA DE ENVÍO\n" 828 "" 830 msgstr "TARIFA DE ENVÍO" 829 831 830 832 #: resources/views/wc-settings/sendcloud-page.php:167 … … 976 978 msgstr "¿Quieres cambiar algún ajuste?" 977 979 978 #: resources/views/wc-settings/sendcloud-page.php:210 979 msgid "Want to see your WooCommerce orders in the Sendcloud Panel?" 980 msgstr "¿Quieres ver tus pedidos de WooCommerce en el Panel de Sendcloud?" 980 #: resources/views/wc-settings/sendcloud-page.php:31 981 msgid "This plugin will create a new user named sendcloud_api" 982 msgstr "Al conectar, este plugin se creará un nuevo usuario llamado <code>sendcloud_api_***</code> con el rol de <a href=\"https://woocommerce.com/posts/a-guide-to-woocommerce-user-roles-permissions-and-security/#section-2\" target=\"_blank\">Gerente de tienda</a>. Se generará una clave de la API REST de WooCommerce con permisos de lectura y escritura para establecer una conexión segura con Sendcloud" 983 984 msgid "I acknowledge and agree" 985 msgstr "Reconozco y acepto la creación de este usuario y clave API." 981 986 982 987 msgid "Warehouse" -
sendcloud-connected-shipping/trunk/i18n/languages/sendcloud-connected-shipping-fr_FR.po
r3266337 r3300820 971 971 msgstr "Vous souhaitez modifier un paramètre ?" 972 972 973 #: resources/views/wc-settings/sendcloud-page.php:210 974 msgid "Want to see your WooCommerce orders in the Sendcloud Panel?" 975 msgstr "Vous voulez voir vos commandes WooCommerce depuis le panel Sendcloud ?" 973 #: resources/views/wc-settings/sendcloud-page.php:31 974 msgid "This plugin will create a new user named sendcloud_api" 975 msgstr "En vous connectant, ce plugin créera un nouvel utilisateur nommé <code>sendcloud_api_***</code> avec le rôle de <a href=\"https://woocommerce.com/posts/a-guide-to-woocommerce-user-roles-permissions-and-security/#section-2\" target=\"_blank\">Gérant de boutique</a>. Une clé API REST WooCommerce avec des autorisations de lecture et d’écriture sera générée pour établir une connexion sécurisée avec Sendcloud" 976 977 msgid "I acknowledge and agree" 978 msgstr "Je reconnais et accepte la création de cet utilisateur et de cette clé API" 976 979 977 980 msgid "Warehouse" -
sendcloud-connected-shipping/trunk/i18n/languages/sendcloud-connected-shipping-it_IT.po
r3266337 r3300820 971 971 msgstr "Vuoi cambiare le impostazioni?" 972 972 973 #: resources/views/wc-settings/sendcloud-page.php:210 974 msgid "Want to see your WooCommerce orders in the Sendcloud Panel?" 975 msgstr "Vuoi visualizzare gli ordini di WooCommerce nel tuo account Sendcloud?" 973 #: resources/views/wc-settings/sendcloud-page.php:31 974 msgid "This plugin will create a new user named sendcloud_api" 975 msgstr "Collegando il tuo negozio, questo plugin creerà un nuovo utente chiamato <code>sendcloud_api_***</code> con il ruolo di <a href=\"https://woocommerce.com/posts/a-guide-to-woocommerce-user-roles-permissions-and-security/#section-2\" target=\"_blank\">Gestore del negozio</a>. Verrà generata una chiave API REST di WooCommerce con permessi di lettura e scrittura per stabilire una connessione sicura con Sendcloud" 976 977 msgid "I acknowledge and agree" 978 msgstr "Confermo e accetto la creazione di questo utente e della chiave API." 976 979 977 980 msgid "Warehouse" -
sendcloud-connected-shipping/trunk/i18n/languages/sendcloud-connected-shipping-nl_NL.po
r3266337 r3300820 971 971 msgstr "Wil je een instelling veranderen?" 972 972 973 #: resources/views/wc-settings/sendcloud-page.php:210 974 msgid "Want to see your WooCommerce orders in the Sendcloud Panel?" 975 msgstr "WooCommerce bestellingen zien in het Sendcloud Panel?" 973 #: resources/views/wc-settings/sendcloud-page.php:31 974 msgid "This plugin will create a new user named sendcloud_api" 975 msgstr "Bij het verbinden maakt deze plugin een nieuwe gebruiker aan met de naam <code>sendcloud_api_***</code> en de rol <a href=\"https://woocommerce.com/posts/a-guide-to-woocommerce-user-roles-permissions-and-security/#section-2\" target=\"_blank\">Winkelmanager</a>. Er wordt een WooCommerce REST API-sleutel met lees- en schrijfrechten gegenereerd om een veilige verbinding met Sendcloud tot stand te brengen" 976 977 msgid "I acknowledge and agree" 978 msgstr "Ik bevestig en ga akkoord met het aanmaken van deze gebruiker en API-sleutel" 976 979 977 980 msgid "Warehouse" -
sendcloud-connected-shipping/trunk/includes/Repositories/class-api-key-repository.php
r3266337 r3300820 16 16 const WC_API_KEYS_TABLE_NAME = 'woocommerce_api_keys'; 17 17 18 /** 19 * Gets fresh api_key 20 * 21 * @return SCCSP_Api_Key 22 */ 23 public function get_fresh_credentials() { 24 $api_key = $this->get_api_key(); 18 /** 19 * @var SCCSP_Config_Repository 20 */ 21 private $config_repository; 22 23 /** 24 * Config_Service constructor. 25 */ 26 public function __construct() { 27 $this->config_repository = new SCCSP_Config_Repository(); 28 } 29 30 /** 31 * Gets fresh api_key 32 * 33 * @return SCCSP_Api_Key 34 */ 35 public function get_fresh_credentials() { 36 $api_key = $this->get_api_key(); 25 37 26 38 if ( is_null( $api_key ) ) { … … 170 182 */ 171 183 private function get_user_id() { 172 $username = 'sendcloud_api'; 173 $password = wp_generate_password(); 184 $username = $this->get_user_name(); 174 185 175 186 // Check if user exists … … 177 188 178 189 if (!$user) { 190 $password = wp_generate_password(); 179 191 // User does not exist, create new admin user 180 192 $user_id = wp_create_user($username, $password); … … 191 203 } 192 204 193 return $user_id; 194 } 205 return $user_id; 206 } 207 208 /** 209 * Generates user name 210 * 211 * @return string 212 */ 213 private function get_user_name() 214 { 215 $user_name = $this->config_repository->get('USER_NAME'); 216 217 if (!$user_name) { 218 $user_name = 'sendcloud_api_' . wp_generate_password( 10, false ); 219 $this->config_repository->save( 'USER_NAME', $user_name); 220 } 221 222 return $user_name; 223 } 195 224 } -
sendcloud-connected-shipping/trunk/includes/ServicePoint/Checkout/class-checkout-block-handler.php
r3266337 r3300820 28 28 ); 29 29 30 add_action( 'woocommerce_store_api_checkout_order_processed', 31 array( $this, 'validate_and_save' ) ); 30 add_action( 'woocommerce_store_api_checkout_update_order_from_request', 31 array( $this, 'validate_and_save' ), 32 10, 33 2 34 ); 32 35 } 33 36 … … 56 59 * 57 60 * @param \WC_Order $order 61 * @param \WP_REST_Request $request 58 62 * 59 63 * @return void 60 64 */ 61 public function validate_and_save( \WC_Order $order) {65 public function validate_and_save(\WC_Order $order, \WP_REST_Request $request) { 62 66 /** 63 67 * This method will be adjusted after Sendcloud team finishes React.js script … … 75 79 return; 76 80 } 77 $nonce = $this->get_nonce(); 78 $service_point_selected = isset( $_POST[ self::SERVICE_POINT_EXTRA_FIELD_NAME_V2 ] ) 79 && ( ( $nonce && wp_verify_nonce( sanitize_text_field( $nonce ), 80 'woocommerce-process_checkout' ) ) 81 || WC()->session->get( 'reload_checkout', false ) ); 81 $nonce = $this->get_wp_block_nonce(); 82 $service_point_selected = $this->fetch_service_point_data($request) && $nonce; 82 83 83 84 if ( ! $service_point_selected ) { … … 86 87 $order_repository = new SCCSP_Order_Repository(); 87 88 88 $service_point_json = isset( $_POST[ self::SERVICE_POINT_EXTRA_FIELD_NAME_V2 ])89 ? sanitize_text_field( wp_unslash( $_POST[ self::SERVICE_POINT_EXTRA_FIELD_NAME_V2 ] )) : '';89 $service_point_json = $this->fetch_service_point_data($request) 90 ? sanitize_text_field(wp_unslash($this->fetch_service_point_data($request))) : ''; 90 91 $service_point = json_decode( $service_point_json, true ); 91 92 if ( isset( $service_point['id'], $service_point['toPostalCode'], $service_point['name'], … … 100 101 } 101 102 } 103 104 /** 105 * Fetch service point data from request 106 * 107 * @param \WP_REST_Request $request 108 * 109 * @return mixed|null 110 */ 111 public function fetch_service_point_data(\WP_REST_Request $request) { 112 $body = json_decode($request->get_body(), true); 113 114 if (isset($body['extensions']['sendcloud-connected-shipping']['service_point'])) { 115 return $body['extensions']['sendcloud-connected-shipping']['service_point']; 116 } 117 118 return null; 119 } 120 121 /** 122 * Fetch wp nonce from $_SERVER 123 * 124 * @return string|null 125 */ 126 function get_wp_block_nonce() 127 { 128 if (isset($_SERVER['HTTP_X_WP_NONCE'])) { 129 return sanitize_text_field(wp_unslash($_SERVER['HTTP_X_WP_NONCE'])); 130 } 131 132 return null; 133 } 102 134 } -
sendcloud-connected-shipping/trunk/includes/ServicePoint/Checkout/class-checkout-handler.php
r3266337 r3300820 74 74 wp_add_inline_script( 'sendcloud-v2-service-point-js', $service_point_data_script ); 75 75 wp_enqueue_script( 'sendcloud-v2-service-point-js' ); 76 77 wp_enqueue_script( 'sendcloud-v2-service-point-block', 78 SCCSP_Sendcloud::get_plugin_url( 'resources/js/service-point-block.js' ), 79 array( 'jquery' ), 80 SCCSP_Sendcloud::VERSION, 81 true 82 ); 76 83 } 77 84 -
sendcloud-connected-shipping/trunk/includes/class-sendcloud.php
r3266337 r3300820 27 27 28 28 class SCCSP_Sendcloud { 29 const VERSION = '1.0. 6';29 const VERSION = '1.0.11'; 30 30 31 31 const INTEGRATION_NAME = 'sendcloudshipping'; -
sendcloud-connected-shipping/trunk/readme.txt
r3293141 r3300820 1 1 === Sendcloud Shipping === 2 Version: 1.0. 82 Version: 1.0.11 3 3 Developer: SendCloud Global B.V. 4 4 Developer URI: http://sendcloud.com … … 6 6 Requires at least: 4.9 7 7 Requires PHP: 7.0 8 Tested up to: 6. 79 Stable tag: 1.0. 88 Tested up to: 6.8 9 Stable tag: 1.0.11 10 10 License: GPLv2 11 11 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 91 91 92 92 == Changelog == 93 = 1.0.11 = 94 * Changed sendcloud user creation logic 95 96 = 1.0.10 = 97 * Changed the user name created for the plugin. Added connect agreement 98 99 = 1.0.9 = 100 * Fixed issue with creating order with service point method when using block checkout 93 101 94 102 = 1.0.8 = -
sendcloud-connected-shipping/trunk/resources/css/sendcloud.css
r3274838 r3300820 123 123 margin: 0; 124 124 font-weight: normal; 125 } 126 127 .sendcloud-button-text-container .sendcloud-agreement-container { 128 padding-top: 10px; 125 129 } 126 130 … … 150 154 } 151 155 156 .sendcloud-button--primary:disabled { 157 background-color: grey; 158 border-color: grey; 159 cursor: not-allowed; 160 pointer-events: all !important; 161 } 162 163 .sendcloud-button--primary:disabled:hover { 164 background-color: grey; 165 border-color: grey; 166 } 167 152 168 .sendcloud-button--primary:hover { 153 169 background-color: #4d5e81; -
sendcloud-connected-shipping/trunk/resources/js/sendcloud.page.js
r3274838 r3300820 3 3 $(document).ready(function () { 4 4 let button = $('#sendcloud_shipping_connect .connect-button'), 5 agreement = $('#cs_agreement'), 5 6 connectingLabel = $('#sc-connecting-label')[0], 6 7 connectContainer = $('#sc-connect-container')[0], 7 8 dashboardContainer = $('#sc-dashboard-container')[0]; 9 10 agreement.change(function () { 11 if (this.checked) { 12 button.removeAttr('disabled'); 13 } else { 14 button.attr('disabled','disabled'); 15 } 16 }); 17 8 18 button.click(function () { 9 19 let data = { … … 14 24 window.open(response.redirect_url, '_blank'); 15 25 button[0].innerHTML = '<div class="sc-loader"></div> ' + connectingLabel.value; 26 agreement.attr('disabled','disabled'); 16 27 } 17 28 }); -
sendcloud-connected-shipping/trunk/resources/views/wc-settings/sendcloud-page.php
r3274838 r3300820 24 24 echo esc_attr('sc-hidden'); 25 25 }?>"> 26 <p> 27 <?php esc_html_e( 'Want to see your WooCommerce orders in the Sendcloud Panel?', 'sendcloud-connected-shipping' ); ?> 28 </p> 29 <button class="sendcloud-button sendcloud-button--primary connect-button<?php echo esc_attr( !$data['permalinks_enabled'] ? ' sendcloud-button-disabled' : '' ); ?>"> 26 <button disabled class="sendcloud-button sendcloud-button--primary connect-button<?php echo esc_attr( !$data['permalinks_enabled'] ? ' sendcloud-button-disabled' : '' ); ?>"> 30 27 <?php esc_html_e( 'Connect', 'sendcloud-connected-shipping' ); ?> 31 28 </button> 29 <div class="sendcloud-agreement-container"> 30 <p> 31 <?php echo translate( 'This plugin will create a new user named sendcloud_api', 'sendcloud-connected-shipping' ); ?> 32 </p> 33 <p> 34 <label for="cs_agreement" class="show_if_simple tips has-checkbox" style=""> 35 <input id="cs_agreement" name="cs_agreement" type="checkbox"><?php esc_html_e( 'I acknowledge and agree', 'sendcloud-connected-shipping' ); ?> 36 </label> 37 </p> 38 </div> 32 39 </div> 33 40 -
sendcloud-connected-shipping/trunk/sendcloud-connected-shipping.php
r3293141 r3300820 4 4 * Plugin URI: https://wordpress.org/plugins/sendcloud-connected-shipping/ 5 5 * Description: Sendcloud plugin. 6 * Version: 1.0. 86 * Version: 1.0.11 7 7 * Woo: 8 8 * Author: Sendcloud B.V. … … 10 10 * License: GPLv2 11 11 * Requires at least: 4.9 12 * Tested up to: 6. 712 * Tested up to: 6.8 13 13 * 14 14 * Text Domain: sendcloud-connected-shipping 15 15 * Domain Path: /i18n/languages/ 16 16 * WC requires at least: 3.5.0 17 * WC tested up to: 9. 7.117 * WC tested up to: 9.8.5 18 18 * 19 19 * @package sendcloud-connected-shipping -
sendcloud-connected-shipping/trunk/uninstall.php
r3266337 r3300820 12 12 // *********************************************************************************** 13 13 function sccsp_load_woocommerce() { 14 if ( ! empty( $GLOBALS['woocommerce'] ) ) {15 return;16 }14 if ( ! empty( $GLOBALS['woocommerce'] ) ) { 15 return; 16 } 17 17 18 $standard_paths = array(19 WP_PLUGIN_DIR . '/woocommerce/woocommerce.php',20 WPMU_PLUGIN_DIR . '/woocommerce/woocommerce.php',21 ABSPATH . WP_PLUGIN_DIR . '/woocommerce/woocommerce.php',22 ABSPATH . WPMU_PLUGIN_DIR . '/woocommerce/woocommerce.php',23 );18 $standard_paths = array( 19 WP_PLUGIN_DIR . '/woocommerce/woocommerce.php', 20 WPMU_PLUGIN_DIR . '/woocommerce/woocommerce.php', 21 ABSPATH . WP_PLUGIN_DIR . '/woocommerce/woocommerce.php', 22 ABSPATH . WPMU_PLUGIN_DIR . '/woocommerce/woocommerce.php', 23 ); 24 24 25 foreach ( $standard_paths as $standard_path ) {26 if ( file_exists( $standard_path ) ) {27 require_once $standard_path;25 foreach ( $standard_paths as $standard_path ) { 26 if ( file_exists( $standard_path ) ) { 27 require_once $standard_path; 28 28 29 break;30 }31 }29 break; 30 } 31 } 32 32 } 33 33 34 34 // *********************************************************************************** 35 // STEP 2. *************************************************************************** 35 // STEP 3. *************************************************************************** 36 // Delete user and key. * 37 // *********************************************************************************** 38 function sccsp_drop_user_and_api_keys( wpdb $wpdb ) { 39 $query = "SELECT * FROM {$wpdb->prefix}sendcloud_configs WHERE `key`='USER_NAME'"; 40 $result = $wpdb->get_results( $query, ARRAY_A ); 41 42 if ( $result ) { 43 $user_name = $result[0]['value']; 44 $user = get_user_by( 'login', $user_name ); 45 if ($user) { 46 wp_delete_user($user->ID); 47 } 48 } 49 } 50 51 // *********************************************************************************** 52 // STEP 3. *************************************************************************** 36 53 // Drop database. * 37 54 // *********************************************************************************** 38 55 39 56 function sccsp_drop_database( wpdb $wpdb ) { 40 $wpdb->query( "DROP TABLE IF EXISTS {$wpdb->prefix}sendcloud_configs" );57 $wpdb->query( "DROP TABLE IF EXISTS {$wpdb->prefix}sendcloud_configs" ); 41 58 42 delete_option( 'SCCSP_SENDCLOUD_SCHEMA_VERSION' );59 delete_option( 'SCCSP_SENDCLOUD_SCHEMA_VERSION' ); 43 60 } 44 61 45 62 // *********************************************************************************** 46 // STEP 3. ***************************************************************************63 // STEP 4. *************************************************************************** 47 64 // Execute. * 48 65 // *********************************************************************************** … … 50 67 global $wpdb; 51 68 if ( is_multisite() ) { 52 $sites = get_sites(); 53 foreach ( $sites as $site ) { 54 switch_to_blog( $site->blog_id ); 55 sccsp_drop_database( $wpdb ); 56 restore_current_blog(); 57 } 69 $sites = get_sites(); 70 foreach ( $sites as $site ) { 71 switch_to_blog( $site->blog_id ); 72 sccsp_drop_user_and_api_keys( $wpdb ); 73 sccsp_drop_database( $wpdb ); 74 restore_current_blog(); 75 } 58 76 } else { 59 sccsp_drop_database( $wpdb ); 77 sccsp_drop_user_and_api_keys( $wpdb ); 78 sccsp_drop_database( $wpdb ); 60 79 } -
sendcloud-connected-shipping/trunk/vendor/autoload.php
r3293141 r3300820 3 3 // autoload.php @generated by Composer 4 4 5 if (PHP_VERSION_ID < 50600) { 6 if (!headers_sent()) { 7 header('HTTP/1.1 500 Internal Server Error'); 8 } 9 $err = 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL; 10 if (!ini_get('display_errors')) { 11 if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') { 12 fwrite(STDERR, $err); 13 } elseif (!headers_sent()) { 14 echo $err; 15 } 16 } 17 trigger_error( 18 $err, 19 E_USER_ERROR 20 ); 21 } 22 5 23 require_once __DIR__ . '/composer/autoload_real.php'; 6 24 7 return ComposerAutoloaderInit 275cb1d60ba221a798601b5e709ddfda::getLoader();25 return ComposerAutoloaderInit799da1d7fc2f83b97f37781f90812d9d::getLoader(); -
sendcloud-connected-shipping/trunk/vendor/composer/ClassLoader.php
r3266337 r3300820 43 43 class ClassLoader 44 44 { 45 /** @var ?string */ 45 /** @var \Closure(string):void */ 46 private static $includeFile; 47 48 /** @var string|null */ 46 49 private $vendorDir; 47 50 48 51 // PSR-4 49 52 /** 50 * @var array[] 51 * @psalm-var array<string, array<string, int>> 53 * @var array<string, array<string, int>> 52 54 */ 53 55 private $prefixLengthsPsr4 = array(); 54 56 /** 55 * @var array[] 56 * @psalm-var array<string, array<int, string>> 57 * @var array<string, list<string>> 57 58 */ 58 59 private $prefixDirsPsr4 = array(); 59 60 /** 60 * @var array[] 61 * @psalm-var array<string, string> 61 * @var list<string> 62 62 */ 63 63 private $fallbackDirsPsr4 = array(); … … 65 65 // PSR-0 66 66 /** 67 * @var array[] 68 * @psalm-var array<string, array<string, string[]>> 67 * List of PSR-0 prefixes 68 * 69 * Structured as array('F (first letter)' => array('Foo\Bar (full prefix)' => array('path', 'path2'))) 70 * 71 * @var array<string, array<string, list<string>>> 69 72 */ 70 73 private $prefixesPsr0 = array(); 71 74 /** 72 * @var array[] 73 * @psalm-var array<string, string> 75 * @var list<string> 74 76 */ 75 77 private $fallbackDirsPsr0 = array(); … … 79 81 80 82 /** 81 * @var string[] 82 * @psalm-var array<string, string> 83 * @var array<string, string> 83 84 */ 84 85 private $classMap = array(); … … 88 89 89 90 /** 90 * @var bool[] 91 * @psalm-var array<string, bool> 91 * @var array<string, bool> 92 92 */ 93 93 private $missingClasses = array(); 94 94 95 /** @var ?string*/95 /** @var string|null */ 96 96 private $apcuPrefix; 97 97 98 98 /** 99 * @var self[]99 * @var array<string, self> 100 100 */ 101 101 private static $registeredLoaders = array(); 102 102 103 103 /** 104 * @param ?string$vendorDir104 * @param string|null $vendorDir 105 105 */ 106 106 public function __construct($vendorDir = null) 107 107 { 108 108 $this->vendorDir = $vendorDir; 109 } 110 111 /** 112 * @return string[] 109 self::initializeIncludeClosure(); 110 } 111 112 /** 113 * @return array<string, list<string>> 113 114 */ 114 115 public function getPrefixes() … … 122 123 123 124 /** 124 * @return array[] 125 * @psalm-return array<string, array<int, string>> 125 * @return array<string, list<string>> 126 126 */ 127 127 public function getPrefixesPsr4() … … 131 131 132 132 /** 133 * @return array[] 134 * @psalm-return array<string, string> 133 * @return list<string> 135 134 */ 136 135 public function getFallbackDirs() … … 140 139 141 140 /** 142 * @return array[] 143 * @psalm-return array<string, string> 141 * @return list<string> 144 142 */ 145 143 public function getFallbackDirsPsr4() … … 149 147 150 148 /** 151 * @return string[] Array of classname => path 152 * @psalm-return array<string, string> 149 * @return array<string, string> Array of classname => path 153 150 */ 154 151 public function getClassMap() … … 158 155 159 156 /** 160 * @param string[] $classMap Class to filename map 161 * @psalm-param array<string, string> $classMap 157 * @param array<string, string> $classMap Class to filename map 162 158 * 163 159 * @return void … … 176 172 * appending or prepending to the ones previously set for this prefix. 177 173 * 178 * @param string $prefix The prefix179 * @param string[]|string $paths The PSR-0 root directories180 * @param bool $prepend Whether to prepend the directories174 * @param string $prefix The prefix 175 * @param list<string>|string $paths The PSR-0 root directories 176 * @param bool $prepend Whether to prepend the directories 181 177 * 182 178 * @return void … … 184 180 public function add($prefix, $paths, $prepend = false) 185 181 { 182 $paths = (array) $paths; 186 183 if (!$prefix) { 187 184 if ($prepend) { 188 185 $this->fallbackDirsPsr0 = array_merge( 189 (array)$paths,186 $paths, 190 187 $this->fallbackDirsPsr0 191 188 ); … … 193 190 $this->fallbackDirsPsr0 = array_merge( 194 191 $this->fallbackDirsPsr0, 195 (array)$paths192 $paths 196 193 ); 197 194 } … … 202 199 $first = $prefix[0]; 203 200 if (!isset($this->prefixesPsr0[$first][$prefix])) { 204 $this->prefixesPsr0[$first][$prefix] = (array)$paths;201 $this->prefixesPsr0[$first][$prefix] = $paths; 205 202 206 203 return; … … 208 205 if ($prepend) { 209 206 $this->prefixesPsr0[$first][$prefix] = array_merge( 210 (array)$paths,207 $paths, 211 208 $this->prefixesPsr0[$first][$prefix] 212 209 ); … … 214 211 $this->prefixesPsr0[$first][$prefix] = array_merge( 215 212 $this->prefixesPsr0[$first][$prefix], 216 (array)$paths213 $paths 217 214 ); 218 215 } … … 223 220 * appending or prepending to the ones previously set for this namespace. 224 221 * 225 * @param string $prefix The prefix/namespace, with trailing '\\'226 * @param string[]|string $paths The PSR-4 base directories227 * @param bool $prepend Whether to prepend the directories222 * @param string $prefix The prefix/namespace, with trailing '\\' 223 * @param list<string>|string $paths The PSR-4 base directories 224 * @param bool $prepend Whether to prepend the directories 228 225 * 229 226 * @throws \InvalidArgumentException … … 233 230 public function addPsr4($prefix, $paths, $prepend = false) 234 231 { 232 $paths = (array) $paths; 235 233 if (!$prefix) { 236 234 // Register directories for the root namespace. 237 235 if ($prepend) { 238 236 $this->fallbackDirsPsr4 = array_merge( 239 (array)$paths,237 $paths, 240 238 $this->fallbackDirsPsr4 241 239 ); … … 243 241 $this->fallbackDirsPsr4 = array_merge( 244 242 $this->fallbackDirsPsr4, 245 (array)$paths243 $paths 246 244 ); 247 245 } … … 253 251 } 254 252 $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; 255 $this->prefixDirsPsr4[$prefix] = (array)$paths;253 $this->prefixDirsPsr4[$prefix] = $paths; 256 254 } elseif ($prepend) { 257 255 // Prepend directories for an already registered namespace. 258 256 $this->prefixDirsPsr4[$prefix] = array_merge( 259 (array)$paths,257 $paths, 260 258 $this->prefixDirsPsr4[$prefix] 261 259 ); … … 264 262 $this->prefixDirsPsr4[$prefix] = array_merge( 265 263 $this->prefixDirsPsr4[$prefix], 266 (array)$paths264 $paths 267 265 ); 268 266 } … … 273 271 * replacing any others previously set for this prefix. 274 272 * 275 * @param string $prefix The prefix276 * @param string[]|string $paths The PSR-0 base directories273 * @param string $prefix The prefix 274 * @param list<string>|string $paths The PSR-0 base directories 277 275 * 278 276 * @return void … … 291 289 * replacing any others previously set for this namespace. 292 290 * 293 * @param string $prefix The prefix/namespace, with trailing '\\'294 * @param string[]|string $paths The PSR-4 base directories291 * @param string $prefix The prefix/namespace, with trailing '\\' 292 * @param list<string>|string $paths The PSR-4 base directories 295 293 * 296 294 * @throws \InvalidArgumentException … … 426 424 { 427 425 if ($file = $this->findFile($class)) { 428 includeFile($file); 426 $includeFile = self::$includeFile; 427 $includeFile($file); 429 428 430 429 return true; … … 477 476 478 477 /** 479 * Returns the currently registered loaders indexed by their corresponding vendor directories.480 * 481 * @return self[]478 * Returns the currently registered loaders keyed by their corresponding vendor directories. 479 * 480 * @return array<string, self> 482 481 */ 483 482 public static function getRegisteredLoaders() … … 556 555 return false; 557 556 } 557 558 /** 559 * @return void 560 */ 561 private static function initializeIncludeClosure() 562 { 563 if (self::$includeFile !== null) { 564 return; 565 } 566 567 /** 568 * Scope isolated include. 569 * 570 * Prevents access to $this/self from included files. 571 * 572 * @param string $file 573 * @return void 574 */ 575 self::$includeFile = \Closure::bind(static function($file) { 576 include $file; 577 }, null, null); 578 } 558 579 } 559 560 /**561 * Scope isolated include.562 *563 * Prevents access to $this/self from included files.564 *565 * @param string $file566 * @return void567 * @private568 */569 function includeFile($file)570 {571 include $file;572 } -
sendcloud-connected-shipping/trunk/vendor/composer/InstalledVersions.php
r3266337 r3300820 22 22 * 23 23 * To require its presence, you can require `composer-runtime-api ^2.0` 24 * 25 * @final 24 26 */ 25 27 class InstalledVersions … … 27 29 /** 28 30 * @var mixed[]|null 29 * @psalm-var array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}|array{}|null31 * @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}|array{}|null 30 32 */ 31 33 private static $installed; 32 34 33 35 /** 36 * @var bool 37 */ 38 private static $installedIsLocalDir; 39 40 /** 34 41 * @var bool|null 35 42 */ … … 38 45 /** 39 46 * @var array[] 40 * @psalm-var array<string, array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>47 * @psalm-var array<string, array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}> 41 48 */ 42 49 private static $installedByVendor = array(); … … 97 104 foreach (self::getInstalled() as $installed) { 98 105 if (isset($installed['versions'][$packageName])) { 99 return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']);106 return $includeDevRequirements || !isset($installed['versions'][$packageName]['dev_requirement']) || $installed['versions'][$packageName]['dev_requirement'] === false; 100 107 } 101 108 } … … 118 125 public static function satisfies(VersionParser $parser, $packageName, $constraint) 119 126 { 120 $constraint = $parser->parseConstraints( $constraint);127 $constraint = $parser->parseConstraints((string) $constraint); 121 128 $provided = $parser->parseConstraints(self::getVersionRanges($packageName)); 122 129 … … 242 249 /** 243 250 * @return array 244 * @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}251 * @psalm-return array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool} 245 252 */ 246 253 public static function getRootPackage() … … 256 263 * @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect. 257 264 * @return array[] 258 * @psalm-return array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}265 * @psalm-return array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} 259 266 */ 260 267 public static function getRawData() … … 279 286 * 280 287 * @return array[] 281 * @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>288 * @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}> 282 289 */ 283 290 public static function getAllRawData() … … 302 309 * @return void 303 310 * 304 * @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>} $data311 * @psalm-param array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $data 305 312 */ 306 313 public static function reload($data) … … 308 315 self::$installed = $data; 309 316 self::$installedByVendor = array(); 317 318 // when using reload, we disable the duplicate protection to ensure that self::$installed data is 319 // always returned, but we cannot know whether it comes from the installed.php in __DIR__ or not, 320 // so we have to assume it does not, and that may result in duplicate data being returned when listing 321 // all installed packages for example 322 self::$installedIsLocalDir = false; 310 323 } 311 324 312 325 /** 313 326 * @return array[] 314 * @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>327 * @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}> 315 328 */ 316 329 private static function getInstalled() … … 321 334 322 335 $installed = array(); 336 $copiedLocalDir = false; 323 337 324 338 if (self::$canGetVendors) { 339 $selfDir = strtr(__DIR__, '\\', '/'); 325 340 foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) { 341 $vendorDir = strtr($vendorDir, '\\', '/'); 326 342 if (isset(self::$installedByVendor[$vendorDir])) { 327 343 $installed[] = self::$installedByVendor[$vendorDir]; 328 344 } elseif (is_file($vendorDir.'/composer/installed.php')) { 329 $installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php'; 330 if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) { 331 self::$installed = $installed[count($installed) - 1]; 345 /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */ 346 $required = require $vendorDir.'/composer/installed.php'; 347 self::$installedByVendor[$vendorDir] = $required; 348 $installed[] = $required; 349 if (self::$installed === null && $vendorDir.'/composer' === $selfDir) { 350 self::$installed = $required; 351 self::$installedIsLocalDir = true; 332 352 } 353 } 354 if (self::$installedIsLocalDir && $vendorDir.'/composer' === $selfDir) { 355 $copiedLocalDir = true; 333 356 } 334 357 } … … 339 362 // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 340 363 if (substr(__DIR__, -8, 1) !== 'C') { 341 self::$installed = require __DIR__ . '/installed.php'; 364 /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */ 365 $required = require __DIR__ . '/installed.php'; 366 self::$installed = $required; 342 367 } else { 343 368 self::$installed = array(); 344 369 } 345 370 } 346 $installed[] = self::$installed; 371 372 if (self::$installed !== array() && !$copiedLocalDir) { 373 $installed[] = self::$installed; 374 } 347 375 348 376 return $installed; -
sendcloud-connected-shipping/trunk/vendor/composer/LICENSE
r3293141 r3300820 1 1 2 Copyright (c) Nils Adermann, Jordi Boggiano 2 3 … … 18 19 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 20 THE SOFTWARE. 21 -
sendcloud-connected-shipping/trunk/vendor/composer/autoload_classmap.php
r3274838 r3300820 3 3 // autoload_classmap.php @generated by Composer 4 4 5 $vendorDir = dirname( dirname(__FILE__));5 $vendorDir = dirname(__DIR__); 6 6 $baseDir = dirname($vendorDir); 7 7 … … 23 23 'SCCSP\\SendCloud\\Connected\\Shipping\\Database\\Migrations\\Migration_1_0_0' => $baseDir . '/database/Migrations/migration.v.1.0.0.php', 24 24 'SCCSP\\SendCloud\\Connected\\Shipping\\Database\\Migrations\\Migration_1_0_1' => $baseDir . '/database/Migrations/migration.v.1.0.1.php', 25 'SCCSP\\SendCloud\\Connected\\Shipping\\Database\\Migrations\\Migration_1_0_11' => $baseDir . '/database/Migrations/migration.v.1.0.11.php', 25 26 'SCCSP\\SendCloud\\Connected\\Shipping\\Database\\SCCSP_Abstract_Migration' => $baseDir . '/database/class-abstract-migration.php', 26 27 'SCCSP\\SendCloud\\Connected\\Shipping\\Database\\SCCSP_Migrator' => $baseDir . '/database/class-migrator.php', -
sendcloud-connected-shipping/trunk/vendor/composer/autoload_namespaces.php
r3266337 r3300820 3 3 // autoload_namespaces.php @generated by Composer 4 4 5 $vendorDir = dirname( dirname(__FILE__));5 $vendorDir = dirname(__DIR__); 6 6 $baseDir = dirname($vendorDir); 7 7 -
sendcloud-connected-shipping/trunk/vendor/composer/autoload_psr4.php
r3266337 r3300820 3 3 // autoload_psr4.php @generated by Composer 4 4 5 $vendorDir = dirname( dirname(__FILE__));5 $vendorDir = dirname(__DIR__); 6 6 $baseDir = dirname($vendorDir); 7 7 -
sendcloud-connected-shipping/trunk/vendor/composer/autoload_real.php
r3293141 r3300820 3 3 // autoload_real.php @generated by Composer 4 4 5 class ComposerAutoloaderInit 275cb1d60ba221a798601b5e709ddfda5 class ComposerAutoloaderInit799da1d7fc2f83b97f37781f90812d9d 6 6 { 7 7 private static $loader; … … 25 25 require __DIR__ . '/platform_check.php'; 26 26 27 spl_autoload_register(array('ComposerAutoloaderInit 275cb1d60ba221a798601b5e709ddfda', 'loadClassLoader'), true, true);28 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname( \dirname(__FILE__)));29 spl_autoload_unregister(array('ComposerAutoloaderInit 275cb1d60ba221a798601b5e709ddfda', 'loadClassLoader'));27 spl_autoload_register(array('ComposerAutoloaderInit799da1d7fc2f83b97f37781f90812d9d', 'loadClassLoader'), true, true); 28 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); 29 spl_autoload_unregister(array('ComposerAutoloaderInit799da1d7fc2f83b97f37781f90812d9d', 'loadClassLoader')); 30 30 31 $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); 32 if ($useStaticLoader) { 33 require __DIR__ . '/autoload_static.php'; 34 35 call_user_func(\Composer\Autoload\ComposerStaticInit275cb1d60ba221a798601b5e709ddfda::getInitializer($loader)); 36 } else { 37 $map = require __DIR__ . '/autoload_namespaces.php'; 38 foreach ($map as $namespace => $path) { 39 $loader->set($namespace, $path); 40 } 41 42 $map = require __DIR__ . '/autoload_psr4.php'; 43 foreach ($map as $namespace => $path) { 44 $loader->setPsr4($namespace, $path); 45 } 46 47 $classMap = require __DIR__ . '/autoload_classmap.php'; 48 if ($classMap) { 49 $loader->addClassMap($classMap); 50 } 51 } 31 require __DIR__ . '/autoload_static.php'; 32 call_user_func(\Composer\Autoload\ComposerStaticInit799da1d7fc2f83b97f37781f90812d9d::getInitializer($loader)); 52 33 53 34 $loader->register(true); -
sendcloud-connected-shipping/trunk/vendor/composer/autoload_static.php
r3293141 r3300820 5 5 namespace Composer\Autoload; 6 6 7 class ComposerStaticInit 275cb1d60ba221a798601b5e709ddfda7 class ComposerStaticInit799da1d7fc2f83b97f37781f90812d9d 8 8 { 9 9 public static $classMap = array ( … … 24 24 'SCCSP\\SendCloud\\Connected\\Shipping\\Database\\Migrations\\Migration_1_0_0' => __DIR__ . '/../..' . '/database/Migrations/migration.v.1.0.0.php', 25 25 'SCCSP\\SendCloud\\Connected\\Shipping\\Database\\Migrations\\Migration_1_0_1' => __DIR__ . '/../..' . '/database/Migrations/migration.v.1.0.1.php', 26 'SCCSP\\SendCloud\\Connected\\Shipping\\Database\\Migrations\\Migration_1_0_11' => __DIR__ . '/../..' . '/database/Migrations/migration.v.1.0.11.php', 26 27 'SCCSP\\SendCloud\\Connected\\Shipping\\Database\\SCCSP_Abstract_Migration' => __DIR__ . '/../..' . '/database/class-abstract-migration.php', 27 28 'SCCSP\\SendCloud\\Connected\\Shipping\\Database\\SCCSP_Migrator' => __DIR__ . '/../..' . '/database/class-migrator.php', … … 71 72 { 72 73 return \Closure::bind(function () use ($loader) { 73 $loader->classMap = ComposerStaticInit 275cb1d60ba221a798601b5e709ddfda::$classMap;74 $loader->classMap = ComposerStaticInit799da1d7fc2f83b97f37781f90812d9d::$classMap; 74 75 75 76 }, null, ClassLoader::class); -
sendcloud-connected-shipping/trunk/vendor/composer/installed.php
r3293141 r3300820 1 1 <?php return array( 2 2 'root' => array( 3 'name' => 'sendcloud/woocommerce', 3 4 'pretty_version' => 'dev-main', 4 5 'version' => 'dev-main', 6 'reference' => '1cb75feac6f7a19c8c0e8a6474fea04d6404cf7c', 5 7 'type' => 'library', 6 8 'install_path' => __DIR__ . '/../../', 7 9 'aliases' => array(), 8 'reference' => '1ad06eb8c225340f43928a5e878536e68279d623',9 'name' => 'sendcloud/woocommerce',10 10 'dev' => false, 11 11 ), … … 14 14 'pretty_version' => 'dev-main', 15 15 'version' => 'dev-main', 16 'reference' => '1cb75feac6f7a19c8c0e8a6474fea04d6404cf7c', 16 17 'type' => 'library', 17 18 'install_path' => __DIR__ . '/../../', 18 19 'aliases' => array(), 19 'reference' => '1ad06eb8c225340f43928a5e878536e68279d623',20 20 'dev_requirement' => false, 21 21 ),
Note: See TracChangeset
for help on using the changeset viewer.