diff --git a/CHANGELOG.md b/CHANGELOG.md index 496c79f..02b5708 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## 2022-09-23 4.5.0 +* Migrating to PHP 7.0. +* Change logic work with ICML catalog: added streaming generation, added generators in the ICML generation process. +* Change logic work with address + ## 2022-09-05 4.4.9 * Fix bug with product tax diff --git a/README.md b/README.md index 663d82d..2473833 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ [![Build Status](https://github.com/retailcrm/woocommerce-module/workflows/woo/badge.svg)](https://github.com/retailcrm/woocommerce-module/actions) [![Coverage](https://img.shields.io/codecov/c/gh/retailcrm/woocommerce-module/master.svg?logo=github)](https://codecov.io/gh/retailcrm/woocommerce-module) [![GitHub release](https://img.shields.io/github/release/retailcrm/woocommerce-module.svg?logo=codecov)](https://github.com/retailcrm/woocommerce-module/releases) -[![PHP version](https://img.shields.io/badge/PHP->=5.4-blue.svg?logo=php)](https://php.net/) +[![PHP version](https://img.shields.io/badge/PHP->=7.0-blue.svg?logo=php)](https://php.net/) Woocommerce-module ================== diff --git a/VERSION b/VERSION index e49188c..ae15394 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -4.4.9 \ No newline at end of file +4.5.0 \ No newline at end of file diff --git a/composer.json b/composer.json index c287da6..afcdb46 100644 --- a/composer.json +++ b/composer.json @@ -10,7 +10,8 @@ ], "minimum-stability": "dev", "require": { - "ext-simplexml": "*" + "ext-simplexml": "*", + "ext-xmlwriter": "*" }, "require-dev": { "ext-json": "*", diff --git a/resources/pot/retailcrm-es_ES.pot b/resources/pot/retailcrm-es_ES.pot index 36b5a15..dcab8f6 100644 --- a/resources/pot/retailcrm-es_ES.pot +++ b/resources/pot/retailcrm-es_ES.pot @@ -339,3 +339,6 @@ msgstr "Borrar" msgid "Cron tasks cleared" msgstr "Trabajos cron borrados" + +msgid "Untitled" +msgstr "Intitulado" \ No newline at end of file diff --git a/resources/pot/retailcrm-ru_RU.pot b/resources/pot/retailcrm-ru_RU.pot index b40b676..375680b 100644 --- a/resources/pot/retailcrm-ru_RU.pot +++ b/resources/pot/retailcrm-ru_RU.pot @@ -348,3 +348,7 @@ msgstr "Очистить" msgid "Cron tasks cleared" msgstr "Cron задачи очищены" + +msgid "Untitled" +msgstr "Без названия" + diff --git a/src/include/abstracts/class-wc-retailcrm-abstract-builder.php b/src/include/abstracts/class-wc-retailcrm-abstract-builder.php index 1c6ad5f..a3651e9 100644 --- a/src/include/abstracts/class-wc-retailcrm-abstract-builder.php +++ b/src/include/abstracts/class-wc-retailcrm-abstract-builder.php @@ -1,6 +1,7 @@ - * @license https://opensource.org/licenses/MIT MIT License - * @link http://retailcrm.ru/docs/Developers/ApiVersion5 - */ - if (!class_exists('WC_Retailcrm_Request')) { include_once(WC_Integration_Retailcrm::checkCustomFile('include/api/class-wc-retailcrm-request.php')); } @@ -20,6 +8,17 @@ if (!class_exists('WC_Retailcrm_Response')) { include_once(WC_Integration_Retailcrm::checkCustomFile('include/api/class-wc-retailcrm-response.php')); } +/** + * PHP version 7.0 + * + * Class WC_Retailcrm_Client_V5 - Api Client V5 class. + * + * @category Integration + * @package WC_Retailcrm_Client + * @author RetailCRM + * @license https://opensource.org/licenses/MIT MIT License + * @link http://retailcrm.ru/docs/Developers/ApiVersion5 + */ class WC_Retailcrm_Client_V5 { protected $client; diff --git a/src/include/api/class-wc-retailcrm-exception-curl.php b/src/include/api/class-wc-retailcrm-exception-curl.php index 9e53624..0117de4 100644 --- a/src/include/api/class-wc-retailcrm-exception-curl.php +++ b/src/include/api/class-wc-retailcrm-exception-curl.php @@ -1,6 +1,7 @@ - * @license https://opensource.org/licenses/MIT MIT License - * @link http://retailcrm.ru/docs/Developers/ApiVersion5 - */ if (!class_exists('WC_Retailcrm_Proxy')) : + /** + * PHP version 7.0 + * + * Class WC_Retailcrm_Proxy - RetailCRM Integration. + * + * @category Integration + * @package WC_Retailcrm_Proxy + * @author RetailCRM + * @license https://opensource.org/licenses/MIT MIT License + * @link http://retailcrm.ru/docs/Developers/ApiVersion5 + */ class WC_Retailcrm_Proxy { protected $retailcrm; diff --git a/src/include/api/class-wc-retailcrm-request.php b/src/include/api/class-wc-retailcrm-request.php index 9fdb45b..82d14d3 100644 --- a/src/include/api/class-wc-retailcrm-request.php +++ b/src/include/api/class-wc-retailcrm-request.php @@ -1,15 +1,4 @@ - * @license https://opensource.org/licenses/MIT MIT License - * @link http://retailcrm.ru/docs/Developers/ApiVersion5 - */ if (!class_exists('WC_Retailcrm_Exception_Curl')) { include_once(WC_Integration_Retailcrm::checkCustomFile('include/api/class-wc-retailcrm-exception-curl.php')); @@ -19,6 +8,17 @@ if (!class_exists('WC_Retailcrm_Response')) { include_once(WC_Integration_Retailcrm::checkCustomFile('include/api/class-wc-retailcrm-response.php')); } +/** + * PHP version 7.0 + * + * Class WC_Retailcrm_Request - Request class. + * + * @category Integration + * @package WC_Retailcrm_Request + * @author RetailCRM + * @license https://opensource.org/licenses/MIT MIT License + * @link http://retailcrm.ru/docs/Developers/ApiVersion5 + */ class WC_Retailcrm_Request { const METHOD_GET = 'GET'; diff --git a/src/include/api/class-wc-retailcrm-response.php b/src/include/api/class-wc-retailcrm-response.php index 6b2576f..48e4c9a 100644 --- a/src/include/api/class-wc-retailcrm-response.php +++ b/src/include/api/class-wc-retailcrm-response.php @@ -1,6 +1,11 @@ - * @license http://retailcrm.ru Proprietary - * @link http://retailcrm.ru - * @see http://help.retailcrm.ru - */ - if (!class_exists('WC_Retailcrm_Base')) { if (!class_exists('WC_Retailcrm_Abstracts_Settings')) { include_once(WC_Integration_Retailcrm::checkCustomFile('include/abstracts/class-wc-retailcrm-abstracts-settings.php')); } + /** + * PHP version 7.0 + * + * Class WC_Retailcrm_Base - Main settings plugin. + * + * @category Integration + * @author RetailCRM + * @license http://retailcrm.ru Proprietary + * @link http://retailcrm.ru + * @see http://help.retailcrm.ru + */ class WC_Retailcrm_Base extends WC_Retailcrm_Abstracts_Settings { /** @var WC_Retailcrm_Proxy|WC_Retailcrm_Client_V5|bool */ diff --git a/src/include/class-wc-retailcrm-customers.php b/src/include/class-wc-retailcrm-customers.php index f0a4211..c6c34a3 100644 --- a/src/include/class-wc-retailcrm-customers.php +++ b/src/include/class-wc-retailcrm-customers.php @@ -1,17 +1,17 @@ - * @license http://retailcrm.ru Proprietary - * @link http://retailcrm.ru - * @see http://help.retailcrm.ru - */ if (!class_exists('WC_Retailcrm_Customers')) : + /** + * PHP version 7.0 + * + * Class WC_Retailcrm_Customers - Allows transfer data customers with CMS. + * + * @category Integration + * @author RetailCRM + * @license http://retailcrm.ru Proprietary + * @link http://retailcrm.ru + * @see http://help.retailcrm.ru + */ class WC_Retailcrm_Customers { /** @var bool | WC_Retailcrm_Proxy | \WC_Retailcrm_Client_V5 */ diff --git a/src/include/class-wc-retailcrm-daemon-collector.php b/src/include/class-wc-retailcrm-daemon-collector.php index cca9b53..670c5a3 100644 --- a/src/include/class-wc-retailcrm-daemon-collector.php +++ b/src/include/class-wc-retailcrm-daemon-collector.php @@ -1,6 +1,11 @@ - * @license http://retailcrm.ru Proprietary - * @link http://retailcrm.ru - * @see http://help.retailcrm.ru - */ if (!class_exists('WC_Retailcrm_Google_Analytics')) { + /** + * PHP version 7.0 + * + * Class WC_Retailcrm_Google_Analytics - Integration with Google Analytics. + * + * @category Integration + * @author RetailCRM + * @license http://retailcrm.ru Proprietary + * @link http://retailcrm.ru + * @see http://help.retailcrm.ru + */ class WC_Retailcrm_Google_Analytics { private static $instance; private $options; diff --git a/src/include/class-wc-retailcrm-history.php b/src/include/class-wc-retailcrm-history.php index 0157a86..96cc2e9 100644 --- a/src/include/class-wc-retailcrm-history.php +++ b/src/include/class-wc-retailcrm-history.php @@ -1,18 +1,17 @@ - * @license http://retailcrm.ru Proprietary - * @link http://retailcrm.ru - * @see http://help.retailcrm.ru - */ - if (!class_exists('WC_Retailcrm_History')) : + /** + * PHP version 7.0 + * + * Class WC_Retailcrm_History - Allows transfer data orders/customers with CRM. + * + * @category Integration + * @author RetailCRM + * @license http://retailcrm.ru Proprietary + * @link http://retailcrm.ru + * @see http://help.retailcrm.ru + */ class WC_Retailcrm_History { const PAGE_LIMIT = 25; diff --git a/src/include/class-wc-retailcrm-inventories.php b/src/include/class-wc-retailcrm-inventories.php index ccccc65..d526d96 100644 --- a/src/include/class-wc-retailcrm-inventories.php +++ b/src/include/class-wc-retailcrm-inventories.php @@ -1,17 +1,17 @@ - * @license http://retailcrm.ru Proprietary - * @link http://retailcrm.ru - * @see http://help.retailcrm.ru - */ if (!class_exists('WC_Retailcrm_Inventories')) : + /** + * PHP version 7.0 + * + * Class WC_Retailcrm_Inventories - Allows manage stocks. + * + * @category Integration + * @author RetailCRM + * @license http://retailcrm.ru Proprietary + * @link http://retailcrm.ru + * @see http://help.retailcrm.ru + */ class WC_Retailcrm_Inventories { /** @var WC_Retailcrm_Client_V5 */ diff --git a/src/include/class-wc-retailcrm-orders.php b/src/include/class-wc-retailcrm-orders.php index 6ee45b8..1977b9d 100644 --- a/src/include/class-wc-retailcrm-orders.php +++ b/src/include/class-wc-retailcrm-orders.php @@ -1,17 +1,17 @@ - * @license http://retailcrm.ru Proprietary - * @link http://retailcrm.ru - * @see http://help.retailcrm.ru - */ if (!class_exists('WC_Retailcrm_Orders')) : + /** + * PHP version 7.0 + * + * Class WC_Retailcrm_Orders - Allows transfer data orders with CMS. + * + * @category Integration + * @author RetailCRM + * @license http://retailcrm.ru Proprietary + * @link http://retailcrm.ru + * @see http://help.retailcrm.ru + */ class WC_Retailcrm_Orders { /** @var bool|WC_Retailcrm_Proxy|WC_Retailcrm_Client_V5 */ diff --git a/src/include/class-wc-retailcrm-plugin.php b/src/include/class-wc-retailcrm-plugin.php index d307268..03e8bcb 100644 --- a/src/include/class-wc-retailcrm-plugin.php +++ b/src/include/class-wc-retailcrm-plugin.php @@ -1,6 +1,7 @@ - * @license http://retailcrm.ru Proprietary - * @link http://retailcrm.ru - * @see http://help.retailcrm.ru - */ if (class_exists('WC_Retailcrm_Uploader') === false) { + /** + * PHP version 7.0 + * + * Class WC_Retailcrm_Uploader - Allows upload archival orders/customers in CRM. + * + * @category Integration + * @author RetailCRM + * @license http://retailcrm.ru Proprietary + * @link http://retailcrm.ru + * @see http://help.retailcrm.ru + */ class WC_Retailcrm_Uploader { const RETAILCRM_COUNT_OBJECT_UPLOAD = 50; diff --git a/src/include/components/class-wc-retailcrm-customer-switcher.php b/src/include/components/class-wc-retailcrm-customer-switcher.php index 3b4fe77..6afd466 100644 --- a/src/include/components/class-wc-retailcrm-customer-switcher.php +++ b/src/include/components/class-wc-retailcrm-customer-switcher.php @@ -1,6 +1,7 @@ - * @license http://retailcrm.ru Proprietary - * @link http://retailcrm.ru - * @see http://help.retailcrm.ru - */ if (!class_exists('WC_Retailcrm_Logger') && class_exists('WC_Log_Levels')) : + /** + * PHP version 7.0 + * + * Class WC_Retailcrm_Logger - Allows display important debug information. + * + * @category Integration + * @author RetailCRM + * @license http://retailcrm.ru Proprietary + * @link http://retailcrm.ru + * @see http://help.retailcrm.ru * @codeCoverageIgnore */ class WC_Retailcrm_Logger diff --git a/src/include/customer/class-wc-retailcrm-customer-address.php b/src/include/customer/class-wc-retailcrm-customer-address.php index 0e85f96..2d191bb 100644 --- a/src/include/customer/class-wc-retailcrm-customer-address.php +++ b/src/include/customer/class-wc-retailcrm-customer-address.php @@ -1,6 +1,7 @@ wcCustomer = $wcCustomer; $this->wcOrder = $wcOrder; - if ((!is_null($this->wcCustomer) && !($this->wcCustomer instanceof WC_Customer)) + if ( + (!is_null($this->wcCustomer) && !($this->wcCustomer instanceof WC_Customer)) || !($this->wcOrder instanceof WC_Order) ) { throw new \InvalidArgumentException(sprintf('Incorrect data provided to %s', __CLASS__)); diff --git a/src/include/models/class-wc-retailcrm-customer-switcher-state.php b/src/include/models/class-wc-retailcrm-customer-switcher-state.php index 26a69ce..b323175 100644 --- a/src/include/models/class-wc-retailcrm-customer-switcher-state.php +++ b/src/include/models/class-wc-retailcrm-customer-switcher-state.php @@ -1,6 +1,7 @@