codestyle
This commit is contained in:
parent
c9a4eeecf5
commit
14d350c695
2 changed files with 8 additions and 3 deletions
|
@ -31,9 +31,12 @@
|
|||
|
||||
```
|
||||
<?php
|
||||
|
||||
require_once __DIR__ . '/wp-load.php';
|
||||
|
||||
$options = getopt('',['entity::','page::']);
|
||||
do_action("wp_console_upload", $options['entity'] ?? '', (int)$options['page'] ?? 0);
|
||||
|
||||
do_action('wp_console_upload', $options['entity'] ?? '', (int) $options['page'] ?? 0);
|
||||
```
|
||||
2. После чего в командной строке ввести команду для запуска скрипта: <br>
|
||||
|
||||
|
|
|
@ -239,8 +239,8 @@ if (class_exists('WC_Retailcrm_Uploader') === false) {
|
|||
|
||||
public function uploadConsole($entity, $page = 0)
|
||||
{
|
||||
$ordersPages = ceil($this->getCountOrders() / 50);
|
||||
$customerPages = ceil($this->getCountUsers() / 50);
|
||||
$ordersPages = (int) ceil($this->getCountOrders() / 50);
|
||||
$customerPages = (int) ceil($this->getCountUsers() / 50);
|
||||
|
||||
try {
|
||||
switch ($entity) {
|
||||
|
@ -264,6 +264,8 @@ if (class_exists('WC_Retailcrm_Uploader') === false) {
|
|||
|
||||
public function archiveUpload($entity, $page, $totalPages)
|
||||
{
|
||||
echo $entity . ' uploading started' . PHP_EOL;
|
||||
|
||||
do {
|
||||
if ($entity === 'orders') {
|
||||
$this->uploadArchiveOrders($page);
|
||||
|
|
Loading…
Add table
Reference in a new issue