CTX Feed – WooCommerce Product Feed Manager Plugin - Version 3.2.16

Version Description

(2020-02-02) = * Tested upto current WordPress and WooCommerce * PHPCS config added and tested for WPCS Issues * Security Fix Using Nonce and sanitize User Inputs. * Update Support URL

Download this release

Release Info

Developer wahid0003
Plugin Icon 128x128 CTX Feed – WooCommerce Product Feed Manager Plugin
Version 3.2.16
Comparing to
See all releases

Code changes from version 3.2.15 to 3.2.16

README.txt CHANGED
@@ -1,15 +1,15 @@
1
  === WooCommerce Product Feed for Google, Bing, eBay and Many More ===
2
- Contributors: wahid0003
3
  Donate link: https://webappick.com
4
- Tags:woocommerce,google product feed,facebook product feed,woocommerce product feed,woocommerce,
5
  Requires at least: 3.6
6
- Tested Up To: 5.4-alpha-46743
7
  Requires PHP: 5.6
8
- Stable tag: 3.2.15
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
12
- WooCommerce Product Feed Generator for Google Merchant (Shopping), Facebook Catalog, eBay, Bing, PriceSpy, Idealo and More. Support 100+ Merchants.
13
 
14
  == Description ==
15
 
@@ -305,6 +305,12 @@ Using pro version:
305
 
306
  == Changelog ==
307
 
 
 
 
 
 
 
308
  = 3.2.15 (2020-01-23) =
309
  * Fix undefined index in cron callback
310
 
1
  === WooCommerce Product Feed for Google, Bing, eBay and Many More ===
2
+ Contributors: wahid0003,webappick,mhamudul_hk,shuvo586
3
  Donate link: https://webappick.com
4
+ Tags:product feed,woocommerce product feed,google shopping feed,google shopping, XML CSV TXT product feed
5
  Requires at least: 3.6
6
+ Tested Up To: 5.3.2
7
  Requires PHP: 5.6
8
+ Stable tag: 3.2.16
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
12
+ Easily generate woocommerce product feed for any marketing channel like Google Shopping(Merchant), Facebook Remarketing, Bing, eBay & more. Support 100+ Merchants.
13
 
14
  == Description ==
15
 
305
 
306
  == Changelog ==
307
 
308
+ = 3.2.16 (2020-02-02) =
309
+ * Tested upto current WordPress and WooCommerce
310
+ * PHPCS config added and tested for WPCS Issues
311
+ * Security Fix Using Nonce and sanitize User Inputs.
312
+ * Update Support URL
313
+
314
  = 3.2.15 (2020-01-23) =
315
  * Fix undefined index in cron callback
316
 
admin/partials/woo-feed-pro-vs-free.php CHANGED
@@ -477,7 +477,7 @@ $testimonials = array(
477
  <p><?php _e( 'Have we not answered your question?<br>Don\'t worry, you can contact us for more information...', 'woo-feed') ?></p>
478
  </div>
479
  <div class="wapk-cta-action">
480
- <a href="https://webappick.com/support/" class="wapk-button wapk-button-primary" target="_blank"><?php _e( 'Get Support', 'woo-feed' ); ?></a>
481
  </div>
482
  </div>
483
  </div>
477
  <p><?php _e( 'Have we not answered your question?<br>Don\'t worry, you can contact us for more information...', 'woo-feed') ?></p>
478
  </div>
479
  <div class="wapk-cta-action">
480
+ <a href="https://wordpress.org/support/plugin/webappick-product-feed-for-woocommerce/#new-topic-0" class="wapk-button wapk-button-primary" target="_blank"><?php _e( 'Get Support', 'woo-feed' ); ?></a>
481
  </div>
482
  </div>
483
  </div>
includes/class-woo-feed-docs.php CHANGED
@@ -88,7 +88,7 @@ if( ! class_exists( 'WooFeedDocs' ) ) {
88
  <p><?php _e( 'Have we not answered your question?<br>Don\'t worry, you can contact us for more information...', 'woo-feed') ?></p>
89
  </div>
90
  <div class="wapk-cta-action">
91
- <a href="https://webappick.com/support/" class="wapk-button wapk-button-primary" target="_blank"><?php _e( 'Get Support', 'woo-feed' ); ?></a>
92
  </div>
93
  </div>
94
  </div>
@@ -98,7 +98,7 @@ if( ! class_exists( 'WooFeedDocs' ) ) {
98
  __( 'There\'s some problem loading the docs. Please Click <a href="%s">Here</a> To Fetch Again.', 'woo-feed' ),
99
  admin_url( 'admin.php?page=webappick-feed-docs&reload=1&_nonce=' . wp_create_nonce( 'webappick-feed-docs' ) )
100
  ); ?></p>
101
- <p><?php printf( __( 'If the problem persist please contact <a href="%s">our support</a>.', 'woo-feed' ), 'https://webappick.com/support/' ); ?></p>
102
  </div>
103
  <?php } ?>
104
  </div>
88
  <p><?php _e( 'Have we not answered your question?<br>Don\'t worry, you can contact us for more information...', 'woo-feed') ?></p>
89
  </div>
90
  <div class="wapk-cta-action">
91
+ <a href="https://wordpress.org/support/plugin/webappick-product-feed-for-woocommerce/#new-topic-0" class="wapk-button wapk-button-primary" target="_blank"><?php _e( 'Get Support', 'woo-feed' ); ?></a>
92
  </div>
93
  </div>
94
  </div>
98
  __( 'There\'s some problem loading the docs. Please Click <a href="%s">Here</a> To Fetch Again.', 'woo-feed' ),
99
  admin_url( 'admin.php?page=webappick-feed-docs&reload=1&_nonce=' . wp_create_nonce( 'webappick-feed-docs' ) )
100
  ); ?></p>
101
+ <p><?php printf( __( 'If the problem persist please contact <a href="%s">our support</a>.', 'woo-feed' ), 'https://wordpress.org/support/plugin/webappick-product-feed-for-woocommerce/#new-topic-0' ); ?></p>
102
  </div>
103
  <?php } ?>
104
  </div>
includes/classes/class-woo-feed-admin-message.php CHANGED
@@ -30,7 +30,7 @@ class Woo_Feed_Message {
30
  <a class="tutorial button button-secondary button-hero" href="http://bit.ly/2u6giNz" target="_blank"><?php _e( 'Video Tutorials', 'woo-feed' ); ?></a>
31
  </th>
32
  <th>
33
- <a class="support button button-secondary button-hero" href="https://webappick.com/support/" target="_blank"><?php _e( 'Get Free Support', 'woo-feed' ); ?></a>
34
  </th>
35
  </tr>
36
  </tbody>
30
  <a class="tutorial button button-secondary button-hero" href="http://bit.ly/2u6giNz" target="_blank"><?php _e( 'Video Tutorials', 'woo-feed' ); ?></a>
31
  </th>
32
  <th>
33
+ <a class="support button button-secondary button-hero" href="https://wordpress.org/support/plugin/webappick-product-feed-for-woocommerce/#new-topic-0" target="_blank"><?php _e( 'Get Free Support', 'woo-feed' ); ?></a>
34
  </th>
35
  </tr>
36
  </tbody>
includes/classes/class-woo-feed-ftp.php CHANGED
@@ -1,6 +1,4 @@
1
  <?php
2
-
3
-
4
  /**
5
  * A class definition responsible for processing FTP Uploading
6
  *
@@ -11,150 +9,174 @@
11
  * @subpackage Woo_Feed/includes
12
  * @author Ohidul Islam <wahid@webappick.com>
13
  */
14
- Class FTPClient
15
- {
16
- private $connectionId;
17
- private $loginOk = false;
18
- private $messageArray = array();
19
-
20
- public function __construct()
21
- {
22
-
23
- }
24
-
25
- /**
26
- * Store Log Messages
27
- * @param $message
28
- */
29
- private function logMessage($message)
30
- {
31
- $this->messageArray[] = $message;
32
- }
33
-
34
- /**
35
- * Get Logs
36
- * @return array
37
- */
38
- public function getMessages()
39
- {
40
- return $this->messageArray;
41
- }
42
-
43
- /**
44
- * Connect to FTP Server
45
- *
46
- * @param $server
47
- * @param $ftpUser
48
- * @param $ftpPassword
49
- * @param bool $isPassive
50
- * @param $ftpPort
51
- * @return bool
52
- */
53
- public function connect($server, $ftpUser, $ftpPassword, $isPassive = false,$ftpPort=21)
54
- {
55
-
56
- // *** Set up basic connection
57
- $this->connectionId = ftp_connect($server,$ftpPort);
58
-
59
- // *** Login with username and password
60
- $loginResult = ftp_login($this->connectionId, $ftpUser, $ftpPassword);
61
-
62
- // *** Sets passive mode on/off (default off)
63
- ftp_pasv($this->connectionId, $isPassive);
64
-
65
- // *** Check connection
66
- if ((!$this->connectionId) || (!$loginResult)) {
67
- $this->logMessage('FTP connection has failed!');
68
- $this->logMessage('Attempted to connect to ' . $server . ' for user ' . $ftpUser, true);
69
- return false;
70
- } else {
71
- $this->logMessage('Connected to ' . $server . ', for user ' . $ftpUser);
72
- $this->loginOk = true;
73
- return true;
74
- }
75
- }
76
-
77
- private function is_octal($i)
78
- {
79
- return decoct(octdec($i)) == $i;
80
- }
81
 
82
- /**
83
- * Give permission to file
84
- *
85
- * @param $permissions
86
- * @param $remote_filename
87
- * @return bool
88
- */
89
- public function chmod($permissions, $remote_filename)
90
- {
91
- if ($this->is_octal($permissions)) {
92
- $result = ftp_chmod($this->connectionId, $permissions, $remote_filename);
93
- if ($result) {
94
- $this->logMessage("File Permission Granted");
95
- return true;
96
- } else {
97
- $this->logMessage("File Permission Failed");
98
- return false;
99
- }
100
- } else {
101
- $this->logMessage("$permissions must be an octal number");
102
- return false;
103
- }
104
- }
105
-
106
- /** Make Directory
107
- * @param $directory
108
- * @return bool
109
- */
110
- public function makeDir($directory)
111
- {
112
- // *** If creating a directory is successful...
113
- if (ftp_mkdir($this->connectionId, $directory)) {
114
-
115
- $this->logMessage('Directory "' . $directory . '" created successfully');
116
- return true;
117
-
118
- } else {
119
-
120
- // *** ...Else, FAIL.
121
- $this->logMessage('Failed creating directory "' . $directory . '"');
122
- return false;
123
- }
124
- }
125
-
126
- /**
127
- * Upload files to FTP server
128
- * @param $fileFrom
129
- * @param $fileTo
130
- * @return bool
131
- */
132
- public function uploadFile($fileFrom, $fileTo)
133
- {
134
- // *** Set the transfer mode
135
- $asciiArray = array('txt', 'csv', 'xml');
136
- $getExtension = explode('.', $fileFrom);
137
- $extension=end($getExtension);
138
-
139
- if (in_array($extension, $asciiArray)) {
140
- $mode = FTP_ASCII;
141
- } else {
142
- $mode = FTP_BINARY;
143
- }
144
-
145
- // *** Upload the file
146
- $upload = ftp_put($this->connectionId, $fileTo, $fileFrom, $mode);
147
-
148
- // *** Check upload status
149
- if (!$upload) {
150
-
151
- $this->logMessage('FTP upload has failed!');
152
- return false;
153
-
154
- } else {
155
- $this->logMessage('Uploaded "' . $fileFrom . '" as "' . $fileTo);
156
- return true;
157
- }
158
- }
159
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
160
  }
1
  <?php
 
 
2
  /**
3
  * A class definition responsible for processing FTP Uploading
4
  *
9
  * @subpackage Woo_Feed/includes
10
  * @author Ohidul Islam <wahid@webappick.com>
11
  */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
 
13
+ if ( ! defined( 'ABSPATH' ) ) {
14
+ die(); // If this file is called directly, abort.
15
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
 
17
+ /**
18
+ * Class FTPClient
19
+ */
20
+ Class FTPClient {
21
+ /**
22
+ * Holds The FTP Connection Resource
23
+ * @var resource
24
+ */
25
+ private $connection_id;
26
+ /**
27
+ * Login Check Flag
28
+ * @var bool
29
+ */
30
+ private $login_ok = false;
31
+ /**
32
+ * Message Array
33
+ * @var array
34
+ */
35
+ private $message_array = array();
36
+
37
+ /**
38
+ * FTPClient constructor.
39
+ */
40
+ public function __construct() {
41
+ }
42
+
43
+ /**
44
+ * Store Log Messages.
45
+ * @param string $message message to add.
46
+ */
47
+ private function log_message( $message ) {
48
+ $this->message_array[] = $message;
49
+ }
50
+
51
+ /**
52
+ * Get Logs.
53
+ * @return array
54
+ */
55
+ public function get_messages() {
56
+ return $this->message_array;
57
+ }
58
+
59
+ /**
60
+ * Connect to FTP Server
61
+ *
62
+ * @param string $server Server host.
63
+ * @param string $ftp_user FTP Username.
64
+ * @param string $ftp_password FTP Password.
65
+ * @param bool $is_passive FTP Transfer Mode.
66
+ * @param int $ftp_port FTP Port.
67
+ * @return bool
68
+ */
69
+ public function connect( $server, $ftp_user, $ftp_password, $is_passive = false, $ftp_port = 21 ) {
70
+
71
+ // *** Set up basic connection
72
+ $this->connection_id = ftp_connect( $server, $ftp_port );
73
+ if ( ! $this->connection_id ) {
74
+ $this->log_message( esc_html__( 'FTP connection has failed!', 'woo-feed' ) );
75
+ /* translators: 1: ftp username, 2: server host, 3: server port */
76
+ $this->log_message( sprintf( esc_html__( 'Attempted to connect to %1$s@%2$s:%3$s', 'woo-feed' ), $ftp_user, $server, $ftp_port ) );
77
+ return false;
78
+ }
79
+ // *** Login with username and password
80
+ $login_result = ftp_login( $this->connection_id, $ftp_user, $ftp_password );
81
+ // *** Sets passive mode on/off (default off)
82
+ ftp_pasv( $this->connection_id, $is_passive );
83
+ // *** Check connection
84
+ if ( ! $login_result ) {
85
+ $this->log_message( esc_html__( 'FTP Login has failed!', 'woo-feed' ) );
86
+ /* translators: 1: ftp username, 2: server host, 3: server port */
87
+ $this->log_message( sprintf( esc_html__( 'Attempted to login %1$s@%2$s:%3$s', 'woo-feed' ), $ftp_user, $server, $ftp_port ) );
88
+ return false;
89
+ } else {
90
+ /* translators: 1: ftp username, 2: server host, 3: server port */
91
+ $this->log_message( sprintf( esc_html__( 'Connected to %1$s@%2$s:%3$s', 'woo-feed' ), $ftp_user, $server, $ftp_port ) );
92
+ $this->login_ok = true;
93
+ return true;
94
+ }
95
+ }
96
+
97
+ /**
98
+ * Check if input is valid octal
99
+ * @param mixed $input input data.
100
+ *
101
+ * @return bool
102
+ */
103
+ private function is_octal( $input ) {
104
+ return decoct( octdec( $input ) ) == $input;
105
+ }
106
+
107
+ /**
108
+ * Give permission to file.
109
+ *
110
+ * @param int $permissions permission mode.
111
+ * @param string $remote_filename remote file name with full path.
112
+ * @return bool
113
+ */
114
+ public function chmod( $permissions, $remote_filename ) {
115
+ if ( $this->is_octal( $permissions ) ) {
116
+ $result = ftp_chmod( $this->connection_id, $permissions, $remote_filename );
117
+ if ( $result ) {
118
+ $this->log_message( esc_html__( 'File Permission Granted', 'woo-feed' ) );
119
+
120
+ return true;
121
+ } else {
122
+ $this->log_message( esc_html__( 'File Permission Failed', 'woo-feed' ) );
123
+
124
+ return false;
125
+ }
126
+ } else {
127
+ /* translators: Permission Mode */
128
+ $this->log_message( sprintf( esc_html__( '%s must be an octal number', 'woo-feed' ), $permissions ) );
129
+
130
+ return false;
131
+ }
132
+ }
133
+
134
+ /**
135
+ * Make Directory.
136
+ * @param string $directory Directory name and path.
137
+ * @return bool
138
+ */
139
+ public function make_dir( $directory ) {
140
+ // *** If creating a directory is successful...
141
+ if ( ftp_mkdir( $this->connection_id, $directory ) ) {
142
+ /* translators: Permission Mode */
143
+ $this->log_message( sprintf( esc_html__( 'Directory "%s" created successfully.', 'woo-feed' ), $directory ) );
144
+ return true;
145
+
146
+ } else {
147
+ /* translators: Directory Path */
148
+ $this->log_message( sprintf( esc_html__( 'Failed creating directory "%s".', 'woo-feed' ), $directory ) );
149
+ return false;
150
+ }
151
+ }
152
+
153
+ /**
154
+ * Upload files to FTP server
155
+ *
156
+ * @param string $file_from file name and path that needs to be uploaded.
157
+ * @param string $file_to file name and path where the to put the file.
158
+ *
159
+ * @return bool
160
+ */
161
+ public function upload_file( $file_from, $file_to ) {
162
+
163
+ // *** Set the transfer mode
164
+ $ascii_array = array( 'txt', 'csv', 'xml' );
165
+ $get_extension = explode( '.', $file_from );
166
+ $extension = end( $get_extension );
167
+
168
+ $mode = in_array( $extension, $ascii_array ) ? FTP_ASCII : FTP_BINARY;
169
+
170
+ // *** Upload the file
171
+ $upload = ftp_put( $this->connection_id, $file_to, $file_from, $mode );
172
+ // *** Check upload status
173
+ if ( ! $upload ) {
174
+ $this->log_message( 'FTP upload has failed!' );
175
+ return false;
176
+ } else {
177
+ /* translators: 1: file from, 2: file to */
178
+ $this->log_message( sprintf( esc_html__( 'Uploaded "%1$s" as "%2$s"', 'woo-feed' ), $file_from, $file_to ) );
179
+ return true;
180
+ }
181
+ }
182
  }
includes/classes/class-woo-feed-webappick-api.php CHANGED
@@ -121,7 +121,7 @@ if( ! class_exists( 'WooFeedWebAppickAPI' ) ) {
121
  add_filter( "WebAppick_{$projectSlug}_Support_Request_Ajax_Success_Response", [ $this, 'supportResponse' ], 10 );
122
  add_filter( "WebAppick_{$projectSlug}_Support_Request_Ajax_Error_Response", [ $this, 'supportErrorResponse' ], 10 );
123
  add_filter( "WebAppick_{$projectSlug}_Support_Page_URL", function(){
124
- return 'https://webappick.com/support/';
125
  }, 10 );
126
  $this->insights->init();
127
  }
@@ -177,7 +177,7 @@ if( ! class_exists( 'WooFeedWebAppickAPI' ) ) {
177
  return sprintf(
178
  '<div class="mui-error"><p>%s</p><p>%s</p><br><br><p style="font-size: 12px;">%s</p></div>',
179
  esc_html__( 'Something Went Wrong. Please Try The Support Ticket Form On Our Website.', 'woo-feed' ),
180
- sprintf( '<a class="button button-primary" href="https://webappick.com/support/" target="_blank">%s</a>', esc_html__( 'Get Support', 'woo-feed' ) ),
181
  esc_html__( 'Support Ticket form will open in new tab in 5 seconds.', 'woo-feed' )
182
  );
183
  }
121
  add_filter( "WebAppick_{$projectSlug}_Support_Request_Ajax_Success_Response", [ $this, 'supportResponse' ], 10 );
122
  add_filter( "WebAppick_{$projectSlug}_Support_Request_Ajax_Error_Response", [ $this, 'supportErrorResponse' ], 10 );
123
  add_filter( "WebAppick_{$projectSlug}_Support_Page_URL", function(){
124
+ return 'https://wordpress.org/support/plugin/webappick-product-feed-for-woocommerce/#new-topic-0';
125
  }, 10 );
126
  $this->insights->init();
127
  }
177
  return sprintf(
178
  '<div class="mui-error"><p>%s</p><p>%s</p><br><br><p style="font-size: 12px;">%s</p></div>',
179
  esc_html__( 'Something Went Wrong. Please Try The Support Ticket Form On Our Website.', 'woo-feed' ),
180
+ sprintf( '<a class="button button-primary" href="https://wordpress.org/support/plugin/webappick-product-feed-for-woocommerce/#new-topic-0" target="_blank">%s</a>', esc_html__( 'Get Support', 'woo-feed' ) ),
181
  esc_html__( 'Support Ticket form will open in new tab in 5 seconds.', 'woo-feed' )
182
  );
183
  }
phpcs.xml ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <ruleset name="WebAppick Coding Standards">
3
+ <description>WebAppick dev PHP_CodeSniffer ruleset.</description>
4
+
5
+ <file>.</file>
6
+
7
+ <!-- Exclude paths -->
8
+ <exclude-pattern>tests/cli/</exclude-pattern>
9
+ <exclude-pattern>includes/wc-legacy-support.php</exclude-pattern>
10
+ <exclude-pattern>*/node_modules/*</exclude-pattern>
11
+ <exclude-pattern>*/vendor/*</exclude-pattern>
12
+
13
+ <!-- Show progress, show the error codes for each message (source). -->
14
+ <arg value="ps" />
15
+
16
+ <!-- Strip the file paths in reports down to the relevant bit. -->
17
+ <arg name="basepath" value="./" />
18
+
19
+ <!-- Check up to 8 files simultaneously. -->
20
+ <!-- <arg name="parallel" value="8" />-->
21
+
22
+ <!-- Configs -->
23
+ <!-- <config name="minimum_supported_wp_version" value="5.0" />-->
24
+ <!-- <config name="testVersion" value="5.6-" />-->
25
+
26
+ <!-- Rules -->
27
+ <rule ref="WordPress">
28
+ <exclude name="WordPress.Files.FileName.InvalidClassFileName"/>
29
+ </rule>
30
+ <rule ref="WordPress-Core" />
31
+ <rule ref="WordPress-Extra" />
32
+ <rule ref="WordPress-VIP-Go" />
33
+
34
+ <rule ref="WordPress.WP.I18n">
35
+ <properties>
36
+ <property name="text_domain" type="array" value="woo-feed" />
37
+ </properties>
38
+ </rule>
39
+
40
+ <rule ref="PHPCompatibility">
41
+ <exclude-pattern>tests/</exclude-pattern>
42
+ </rule>
43
+
44
+ <rule ref="WordPress.Files.FileName.InvalidClassFileName">
45
+ <exclude-pattern>includes/**/abstract-*.php</exclude-pattern>
46
+ <exclude-pattern>tests/*</exclude-pattern>
47
+ <exclude-pattern>src/*</exclude-pattern>
48
+ </rule>
49
+
50
+ <rule ref="Generic.Commenting">
51
+ <exclude-pattern>tests/</exclude-pattern>
52
+ </rule>
53
+
54
+ <rule ref="PEAR.Functions.FunctionCallSignature.EmptyLine">
55
+ <exclude-pattern>tests/e2e-tests/</exclude-pattern>
56
+ </rule>
57
+
58
+ <rule ref="WordPress.Files.FileName.NotHyphenatedLowercase">
59
+ <exclude-pattern>i18n/</exclude-pattern>
60
+ <exclude-pattern>src/</exclude-pattern>
61
+ </rule>
62
+
63
+ <rule ref="Generic">
64
+ <exclude-pattern>.</exclude-pattern>
65
+ <exclude name="Generic.Commenting.DocComment.SpacingBeforeTags"/>
66
+ <exclude name="Generic.WhiteSpace.DisallowSpaceIndent.SpacesUsed" />
67
+ <exclude name="Generic.WhiteSpace.DisallowTabIndent.NonIndentTabsUsed" />
68
+ <exclude name="Generic.WhiteSpace.DisallowTabIndent.TabsUsed" />
69
+ <exclude name="Generic.PHP.ClosingPHPTag.NotFound" />
70
+ <exclude name="Generic.Files.LineLength.TooLong" />
71
+ </rule>
72
+ </ruleset>
woo-feed.php CHANGED
@@ -15,7 +15,7 @@
15
  * Plugin Name: WooCommerce Product Feed
16
  * Plugin URI: https://webappick.com/
17
  * Description: This plugin generate WooCommerce product feed for Shopping Engines like Google Shopping,Facebook Product Feed,eBay,Amazon,Idealo and many more..
18
- * Version: 3.2.15
19
  * Author: WebAppick
20
  * Author URI: https://webappick.com/
21
  * License: GPL v2
@@ -25,12 +25,12 @@
25
  *
26
  * WP Requirement & Test
27
  * Requires at least: 4.4
28
- * Tested up to: 5.4-alpha-46743
29
  * Requires PHP: 5.6
30
  *
31
  * WC Requirement & Test
32
  * WC requires at least: 3.2
33
- * WC tested up to: 3.8
34
  *
35
  */
36
  // Exit if accessed directly
@@ -41,7 +41,7 @@ if ( ! defined( 'WOO_FEED_FREE_VERSION' ) ) {
41
  * Plugin Version
42
  * @var string
43
  */
44
- define( 'WOO_FEED_FREE_VERSION', '3.2.15' );
45
  }
46
  if ( ! defined( 'WOO_FEED_FREE_FILE') ) {
47
  /**
@@ -244,7 +244,11 @@ if ( ! function_exists( 'woo_feed_get_product_information' ) ) {
244
  }
245
  }
246
  if ( ! function_exists( 'woo_feed_make_batch_feed' ) ) {
247
- add_action('wp_ajax_make_batch_feed', 'woo_feed_make_batch_feed');
 
 
 
 
248
  function woo_feed_make_batch_feed(){
249
  check_ajax_referer('wpf_feed_nonce');
250
  if( ! current_user_can( 'manage_woocommerce' ) ) {
@@ -254,7 +258,7 @@ if ( ! function_exists( 'woo_feed_make_batch_feed' ) ) {
254
  }
255
  //$limit=sanitize_text_field($_POST['limit']);
256
  //$offset=sanitize_text_field($_POST['offset']);
257
- $feedName = sanitize_text_field( str_replace( "wf_feed_", "", $_POST['feed'] ) );
258
  $feedInfo = get_option( $feedName );
259
 
260
  if(!$feedInfo){
@@ -673,7 +677,7 @@ if ( ! function_exists( 'woo_feed_generate_feed' ) ) {
673
  function woo_feed_generate_feed() {
674
  if ( isset( $_POST['provider'], $_POST['_wpnonce'], $_POST['filename'], $_POST['feedType'] ) ) {
675
  # Verify Nonce
676
- if ( ! wp_verify_nonce( $_POST['_wpnonce'], 'woo_feed_form_nonce' ) ) {
677
  wp_die( 'Failed security check' );
678
  }
679
  # Check feed type (file ext)
@@ -710,7 +714,7 @@ if ( ! function_exists( 'woo_feed_manage_feed' ) ) {
710
  if( ! defined( 'WOO_FEED_EDIT_CONFIG' ) ) define( 'WOO_FEED_EDIT_CONFIG', true );
711
  if( count( $_POST ) && isset( $_POST['provider'], $_POST['feed_id'], $_POST['filename'], $_POST['feedType'] ) ) {
712
  # Verify Nonce
713
- if ( ! wp_verify_nonce( $_POST['_wpnonce'], 'wf_edit_feed' ) ) {
714
  wp_die( 'Failed security check' );
715
  }
716
  # Check feed type (file ext)
@@ -752,7 +756,7 @@ if ( ! function_exists( 'woo_feed_manage_feed' ) ) {
752
  } else {
753
  # Update Interval
754
  if ( isset( $_POST['wf_schedule'] ) ) {
755
- if( isset( $_POST['wf_schedule_nonce'] ) && wp_verify_nonce( $_POST['wf_schedule_nonce'],'wf_schedule' ) ) {
756
  $interval = absint( $_POST['wf_schedule'] );
757
  if( $interval >= woo_feed_get_minimum_interval_option() ) {
758
  if ( update_option('wf_schedule', sanitize_text_field( $_POST['wf_schedule'] ) ) ) {
15
  * Plugin Name: WooCommerce Product Feed
16
  * Plugin URI: https://webappick.com/
17
  * Description: This plugin generate WooCommerce product feed for Shopping Engines like Google Shopping,Facebook Product Feed,eBay,Amazon,Idealo and many more..
18
+ * Version: 3.2.16
19
  * Author: WebAppick
20
  * Author URI: https://webappick.com/
21
  * License: GPL v2
25
  *
26
  * WP Requirement & Test
27
  * Requires at least: 4.4
28
+ * Tested up to: 5.3.2
29
  * Requires PHP: 5.6
30
  *
31
  * WC Requirement & Test
32
  * WC requires at least: 3.2
33
+ * WC tested up to: 3.9
34
  *
35
  */
36
  // Exit if accessed directly
41
  * Plugin Version
42
  * @var string
43
  */
44
+ define( 'WOO_FEED_FREE_VERSION', '3.2.16' );
45
  }
46
  if ( ! defined( 'WOO_FEED_FREE_FILE') ) {
47
  /**
244
  }
245
  }
246
  if ( ! function_exists( 'woo_feed_make_batch_feed' ) ) {
247
+ add_action( 'wp_ajax_make_batch_feed', 'woo_feed_make_batch_feed' );
248
+ /**
249
+ * Ajax Batch Callback
250
+ * @return void
251
+ */
252
  function woo_feed_make_batch_feed(){
253
  check_ajax_referer('wpf_feed_nonce');
254
  if( ! current_user_can( 'manage_woocommerce' ) ) {
258
  }
259
  //$limit=sanitize_text_field($_POST['limit']);
260
  //$offset=sanitize_text_field($_POST['offset']);
261
+ $feedName = str_replace( "wf_feed_", "", sanitize_text_field( $_POST['feed'] ) );
262
  $feedInfo = get_option( $feedName );
263
 
264
  if(!$feedInfo){
677
  function woo_feed_generate_feed() {
678
  if ( isset( $_POST['provider'], $_POST['_wpnonce'], $_POST['filename'], $_POST['feedType'] ) ) {
679
  # Verify Nonce
680
+ if ( ! wp_verify_nonce( sanitize_text_field( $_POST['_wpnonce'] ), 'woo_feed_form_nonce' ) ) {
681
  wp_die( 'Failed security check' );
682
  }
683
  # Check feed type (file ext)
714
  if( ! defined( 'WOO_FEED_EDIT_CONFIG' ) ) define( 'WOO_FEED_EDIT_CONFIG', true );
715
  if( count( $_POST ) && isset( $_POST['provider'], $_POST['feed_id'], $_POST['filename'], $_POST['feedType'] ) ) {
716
  # Verify Nonce
717
+ if ( ! wp_verify_nonce( sanitize_text_field( $_POST['_wpnonce'] ), 'wf_edit_feed' ) ) {
718
  wp_die( 'Failed security check' );
719
  }
720
  # Check feed type (file ext)
756
  } else {
757
  # Update Interval
758
  if ( isset( $_POST['wf_schedule'] ) ) {
759
+ if( isset( $_POST['wf_schedule_nonce'] ) && wp_verify_nonce( sanitize_text_field( $_POST['wf_schedule_nonce'] ),'wf_schedule' ) ) {
760
  $interval = absint( $_POST['wf_schedule'] );
761
  if( $interval >= woo_feed_get_minimum_interval_option() ) {
762
  if ( update_option('wf_schedule', sanitize_text_field( $_POST['wf_schedule'] ) ) ) {