Changeset 3275641
- Timestamp:
- 04/17/2025 10:11:45 AM (11 months ago)
- Location:
- storecontrl-wp-connection/trunk
- Files:
-
- 5 edited
-
includes/admin/class-storecontrl-wp-connection-admin.php (modified) (1 diff)
-
includes/api/class-storecontrl-web-api-functions.php (modified) (3 diffs)
-
includes/cronjob/class-storecontrl-cronjob-functions.php (modified) (5 diffs)
-
readme.txt (modified) (2 diffs)
-
storecontrl-wp-connection.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
storecontrl-wp-connection/trunk/includes/admin/class-storecontrl-wp-connection-admin.php
r3267685 r3275641 386 386 </tbody> 387 387 </table> 388 * Most common command: curl -L <?php echo site_url().'/ extendago-process-products'; ?> >/dev/null 2>&1388 * Most common command: curl -L <?php echo site_url().'/storecontrl-process-products'; ?> >/dev/null 2>&1 389 389 <?php 390 390 } -
storecontrl-wp-connection/trunk/includes/api/class-storecontrl-web-api-functions.php
r3258641 r3275641 15 15 private $storecontrl_api_ftp_user; 16 16 private $storecontrl_api_ftp_password; 17 private $storecontrl_masterdata; 18 17 19 private static $storecontrl_ftp_connection; 18 private $storecontrl_masterdata;19 20 20 21 public function __construct() … … 24 25 $this->storecontrl_api_ftp_user = get_option('storecontrl_api_ftp_user'); 25 26 $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');28 27 29 28 // Get Masterdata … … 1742 1741 wp_update_attachment_metadata($attach_id, $attach_data); 1743 1742 } 1744 } else { 1743 } 1744 else { 1745 1745 $logging->log_file_write("Images | Error downloading $remote_path"); 1746 1746 } -
storecontrl-wp-connection/trunk/includes/cronjob/class-storecontrl-cronjob-functions.php
r3258643 r3275641 7 7 private $storecontrl_api_ftp_user; 8 8 private $storecontrl_api_ftp_password; 9 private $storecontrl_api_url;10 9 private $cpu_count; 11 10 … … 22 21 $this->storecontrl_api_ftp_user = get_option('storecontrl_api_ftp_user'); 23 22 $this->storecontrl_api_ftp_password = get_option('storecontrl_api_ftp_password'); 24 25 $this->storecontrl_api_url = $this->functions->getStoreContrlAPIURI();26 23 $this->storecontrl_api_images_url = get_option('storecontrl_api_images_url'); 27 24 … … 473 470 474 471 // 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']) ) { 476 473 continue; 477 474 } … … 1555 1552 public function ConnectToFTPServer() { 1556 1553 1554 error_reporting(E_ALL); 1555 ini_set('display_errors', 1); 1556 1557 1557 if (!extension_loaded('ftp')) { 1558 1558 $this->logging->log_file_write( 'ERROR | FTP-extensie is niet ingeschakeld' ); … … 1564 1564 $this->logging->log_file_write( 'Cronjob | Could not connect to FTP-server at '.$this->storecontrl_api_images_url ); 1565 1565 } 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 } 1586 1590 } 1587 1591 -
storecontrl-wp-connection/trunk/readme.txt
r3267685 r3275641 3 3 Donate link: https://www.arture.nl/abonnementen/ 4 4 Tags: storecontrl, woocommerce, arture, kassakoppeling 5 Requires at least: 1.6.15 Requires at least: 6.0.0 6 6 Tested up to: 6.7.2 7 Stable tag: 4.1. 48 Requires PHP: 0.07 Stable tag: 4.1.5 8 Requires PHP: 7.4 9 9 License: GPLv2 or later 10 10 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 93 93 == Changelog == 94 94 95 = 4.1.5 = 96 * Queue check for empty batch files 97 95 98 = 4.1.4 = 96 99 * Improved and secure log file download function -
storecontrl-wp-connection/trunk/storecontrl-wp-connection.php
r3267685 r3275641 4 4 Plugin URI: http://www.arture.nl/storecontrl 5 5 Description: 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. 46 Version: 4.1.5 7 7 Requires Plugins: woocommerce 8 8 Author: Arture
Note: See TracChangeset
for help on using the changeset viewer.