Plugin Directory

Changeset 3275641


Ignore:
Timestamp:
04/17/2025 10:11:45 AM (11 months ago)
Author:
arture
Message:

Version 4.1.5

Location:
storecontrl-wp-connection/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • storecontrl-wp-connection/trunk/includes/admin/class-storecontrl-wp-connection-admin.php

    r3267685 r3275641  
    386386            </tbody>
    387387        </table>
    388         * Most common command: curl -L <?php echo site_url().'/extendago-process-products'; ?> >/dev/null 2>&1
     388        * Most common command: curl -L <?php echo site_url().'/storecontrl-process-products'; ?> >/dev/null 2>&1
    389389        <?php
    390390    }
  • storecontrl-wp-connection/trunk/includes/api/class-storecontrl-web-api-functions.php

    r3258641 r3275641  
    1515    private $storecontrl_api_ftp_user;
    1616    private $storecontrl_api_ftp_password;
     17    private $storecontrl_masterdata;
     18
    1719    private static $storecontrl_ftp_connection;
    18     private $storecontrl_masterdata;
    1920
    2021    public function __construct()
     
    2425        $this->storecontrl_api_ftp_user = get_option('storecontrl_api_ftp_user');
    2526        $this->storecontrl_api_ftp_password = get_option('storecontrl_api_ftp_password');
    26         $this->storecontrl_api_url = $this->functions->getStoreContrlAPIURI();
    27         $this->storecontrl_api_images_url = get_option('storecontrl_api_images_url');
    2827
    2928        // Get Masterdata
     
    17421741                            wp_update_attachment_metadata($attach_id, $attach_data);
    17431742                        }
    1744                     } else {
     1743                    }
     1744                    else {
    17451745                        $logging->log_file_write("Images | Error downloading $remote_path");
    17461746                    }
  • storecontrl-wp-connection/trunk/includes/cronjob/class-storecontrl-cronjob-functions.php

    r3258643 r3275641  
    77    private $storecontrl_api_ftp_user;
    88    private $storecontrl_api_ftp_password;
    9     private $storecontrl_api_url;
    109    private $cpu_count;
    1110
     
    2221        $this->storecontrl_api_ftp_user = get_option('storecontrl_api_ftp_user');
    2322        $this->storecontrl_api_ftp_password = get_option('storecontrl_api_ftp_password');
    24 
    25         $this->storecontrl_api_url = $this->functions->getStoreContrlAPIURI();
    2623        $this->storecontrl_api_images_url = get_option('storecontrl_api_images_url');
    2724
     
    473470
    474471                                // Check if product is already processed
    475                                 if( isset($product['processed']) && $product['processed'] == 'true' ) {
     472                                if( isset($product['processed']) && $product['processed'] == 'true' || !isset($product['product_id']) ) {
    476473                                    continue;
    477474                                }
     
    15551552    public function ConnectToFTPServer() {
    15561553
     1554        error_reporting(E_ALL);
     1555        ini_set('display_errors', 1);
     1556
    15571557        if (!extension_loaded('ftp')) {
    15581558            $this->logging->log_file_write( 'ERROR | FTP-extensie is niet ingeschakeld' );
     
    15641564            $this->logging->log_file_write( 'Cronjob | Could not connect to FTP-server at '.$this->storecontrl_api_images_url );
    15651565        }
    1566 
    1567         $this::$storecontrl_ftp_login = ftp_login($this::$storecontrl_ftp_connection, $this->storecontrl_api_ftp_user, $this->storecontrl_api_ftp_password);
    1568         if( !$this::$storecontrl_ftp_login ){
    1569             $this->logging->log_file_write( 'Cronjob | Could not login to FTP-server. Error: '.error_get_last()['message'] );
    1570         }
    1571 
    1572         $this::$storecontrl_ftp_pasv = ftp_pasv($this::$storecontrl_ftp_connection, true);
    1573         if( !$this::$storecontrl_ftp_pasv && !empty(error_get_last()) ){
    1574             $this->logging->log_file_write( 'Cronjob | Could not enable passive mode on the FTP-server. Error: '.error_get_last()['message'] );
    1575         }
    1576 
    1577         $this::$storecontrl_ftp_chdir = ftp_chdir($this::$storecontrl_ftp_connection, '');
    1578         if( !$this::$storecontrl_ftp_chdir && !empty(error_get_last()) ){
    1579             $this->logging->log_file_write( 'Cronjob | Cannot access image folder on the FTP-server. Error: '.error_get_last()['message'] );
    1580         }
    1581 
    1582         // Increase FTP timelimit to max execution time
    1583         $max_execution_time = (int)ini_get('max_execution_time');
    1584         if( !isset($max_execution_time) || $max_execution_time == 0 ){ $max_execution_time = 300; }
    1585         ftp_set_option($this::$storecontrl_ftp_connection, FTP_TIMEOUT_SEC, $max_execution_time);
     1566        else {
     1567
     1568            $this::$storecontrl_ftp_login = ftp_login($this::$storecontrl_ftp_connection, $this->storecontrl_api_ftp_user, $this->storecontrl_api_ftp_password);
     1569            if (!$this::$storecontrl_ftp_login) {
     1570                $this->logging->log_file_write('Cronjob | Could not login to FTP-server. Error: ' . error_get_last()['message']);
     1571            }
     1572
     1573            $this::$storecontrl_ftp_pasv = ftp_pasv($this::$storecontrl_ftp_connection, true);
     1574            if (!$this::$storecontrl_ftp_pasv && !empty(error_get_last())) {
     1575                $this->logging->log_file_write('Cronjob | Could not enable passive mode on the FTP-server. Error: ' . error_get_last()['message']);
     1576            }
     1577
     1578            $this::$storecontrl_ftp_chdir = ftp_chdir($this::$storecontrl_ftp_connection, '');
     1579            if (!$this::$storecontrl_ftp_chdir && !empty(error_get_last())) {
     1580                $this->logging->log_file_write('Cronjob | Cannot access image folder on the FTP-server. Error: ' . error_get_last()['message']);
     1581            }
     1582
     1583            // Increase FTP timelimit to max execution time
     1584            $max_execution_time = (int)ini_get('max_execution_time');
     1585            if (!isset($max_execution_time) || $max_execution_time == 0) {
     1586                $max_execution_time = 300;
     1587            }
     1588            ftp_set_option($this::$storecontrl_ftp_connection, FTP_TIMEOUT_SEC, $max_execution_time);
     1589        }
    15861590    }
    15871591
  • storecontrl-wp-connection/trunk/readme.txt

    r3267685 r3275641  
    33Donate link: https://www.arture.nl/abonnementen/
    44Tags: storecontrl, woocommerce, arture, kassakoppeling
    5 Requires at least: 1.6.1
     5Requires at least: 6.0.0
    66Tested up to: 6.7.2
    7 Stable tag: 4.1.4
    8 Requires PHP: 0.0
     7Stable tag: 4.1.5
     8Requires PHP: 7.4
    99License: GPLv2 or later
    1010License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    9393== Changelog ==
    9494
     95= 4.1.5 =
     96* Queue check for empty batch files
     97
    9598= 4.1.4 =
    9699* Improved and secure log file download function
  • storecontrl-wp-connection/trunk/storecontrl-wp-connection.php

    r3267685 r3275641  
    44Plugin URI:  http://www.arture.nl/storecontrl
    55Description: The Wordpress plugin for connecting Woocommerce with StoreContrl Cloud. With the synchronizing cronjobs your products will be automatically processed, images added, and the categories set. Every 5 minutes all stock changes are processed. We provide a up-to-date plugin, easy setup and always the best support.
    6 Version:     4.1.4
     6Version:     4.1.5
    77Requires Plugins: woocommerce
    88Author:      Arture
Note: See TracChangeset for help on using the changeset viewer.