From 3e1827954c131f83919ae672f93d054cca66af4d Mon Sep 17 00:00:00 2001 From: ellynoize Date: Sat, 21 Dec 2024 12:16:47 +0300 Subject: [PATCH] fix resolves --- CHANGELOG.md | 2 +- src/include/class-wc-retailcrm-uploader.php | 11 +++++------ src/readme.txt | 2 +- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5977540..9f41b16 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,5 @@ ## 2024-12-19 4.8.15 -* Add export archive in CRM +* Fix uploading archive in CRM using console script ## 2024-11-07 4.8.14 * The method for determining the stock quantity has been optimized diff --git a/src/include/class-wc-retailcrm-uploader.php b/src/include/class-wc-retailcrm-uploader.php index ce92125..ba30157 100644 --- a/src/include/class-wc-retailcrm-uploader.php +++ b/src/include/class-wc-retailcrm-uploader.php @@ -246,14 +246,14 @@ if (class_exists('WC_Retailcrm_Uploader') === false) { try { switch ($entity) { case 'orders': - $this->ArchiveUpload('orders', $page, $ordersPages); + $this->archiveUpload('orders', $page, $ordersPages); break; case 'customers': - $this->ArchiveUpload('customers', $page, $customerPages); + $this->archiveUpload('customers', $page, $customerPages); break; case 'full_upload': - $this->ArchiveUpload('customers', 0, $customerPages); - $this->ArchiveUpload('orders', 0, $ordersPages); + $this->archiveUpload('customers', 0, $customerPages); + $this->archiveUpload('orders', 0, $ordersPages); break; default: echo 'Unknown entity: ' . $entity; @@ -268,11 +268,10 @@ if (class_exists('WC_Retailcrm_Uploader') === false) { for ($i = $page; $i <= $countPages; $i++) { if ($entity === 'orders') { $this->uploadArchiveOrders($i); - echo $page . ' page uploaded' . PHP_EOL; } elseif ($entity === 'customers') { $this->uploadArchiveCustomers($i); - echo $page . ' page uploaded' . PHP_EOL; } + echo $page . ' page uploaded' . PHP_EOL; } } } diff --git a/src/readme.txt b/src/readme.txt index 98ea359..cc6631c 100644 --- a/src/readme.txt +++ b/src/readme.txt @@ -83,7 +83,7 @@ Asegúrate de tener una clave API específica para cada tienda. Las siguientes i == Changelog == = 4.8.15 = -* Add export archive in CRM +* Fix uploading archive in CRM using console script = 4.8.14 = * The method for determining the stock quantity has been optimized