CTX Feed – WooCommerce Product Feed Manager Plugin - Version 4.0.0

Version Description

(2020-10-11) = * Fix: Code Refactor.

Download this release

Release Info

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

Code changes from version 3.9.9 to 4.0.0

README.txt CHANGED
@@ -5,7 +5,7 @@ Tags:product feed,woocommerce product feed,google shopping feed,google shopping,
5
  Requires at least: 3.6
6
  Tested Up To: 5.5
7
  Requires PHP: 5.6
8
- Stable tag: 3.9.9
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -308,6 +308,9 @@ Using pro version:
308
 
309
  == Changelog ==
310
 
 
 
 
311
  = 3.9.9 (2020-10-08) =
312
  * Added: Zbozi.cz template.
313
  * Tweak: Documentation link updated.
5
  Requires at least: 3.6
6
  Tested Up To: 5.5
7
  Requires PHP: 5.6
8
+ Stable tag: 4.0.0
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
308
 
309
  == Changelog ==
310
 
311
+ = 4.0.0 (2020-10-11) =
312
+ * Fix: Code Refactor.
313
+
314
  = 3.9.9 (2020-10-08) =
315
  * Added: Zbozi.cz template.
316
  * Tweak: Documentation link updated.
admin/class-woo-feed-admin.php CHANGED
@@ -74,7 +74,7 @@ class Woo_Feed_Admin {
74
  wp_register_style( 'slick', plugin_dir_url( __FILE__ ) . 'css/slick' . $ext, array(), $this->version );
75
  wp_register_style( 'slick-theme', plugin_dir_url( __FILE__ ) . 'css/slick-theme' . $ext, array(), $this->version );
76
  $mainDeps = array( 'selectize', 'fancy-select', 'list-tables', 'edit' );
77
- if ( 'woo-feed_page_webappick-feed-pro-vs-free' == $hook ) {
78
  $mainDeps = array_merge( $mainDeps, array( 'slick', 'slick-theme' ) );
79
  }
80
  }
@@ -147,8 +147,8 @@ class Woo_Feed_Admin {
147
  ],
148
  ],
149
  'nonce' => wp_create_nonce( 'wpf_feed_nonce' ),
150
- 'is_feed_edit' => isset( $_GET['page'], $_GET['action'] ) && 'webappick-manage-feeds' == $_GET['page'] && 'edit-feed' == $_GET['action'], // phpcs:ignore WordPress.Security.NonceVerification.Recommended
151
- 'is_feed_add' => isset( $_GET['page'] ) && 'webappick-new-feed' == $_GET['page'], // phpcs:ignore WordPress.Security.NonceVerification.Recommended
152
  'na' => esc_html__( 'N/A', 'woo-feed' ),
153
  'regenerate' => esc_html__( 'Generating...', 'woo-feed' ),
154
  'learn_more' => esc_html__( 'Learn More..', 'woo-feed' ),
@@ -178,9 +178,9 @@ class Woo_Feed_Admin {
178
  ],
179
  );
180
  // phpcs:ignore WordPress.Security.NonceVerification.Recommended
181
- if ( ( isset( $_GET['feed_created'] ) || isset( $_GET['feed_updated'] ) || isset( $_GET['feed_imported'] ) ) && isset( $_GET['feed_regenerate'] ) && 1 == $_GET['feed_regenerate'] ) {
182
  // phpcs:ignore WordPress.Security.NonceVerification.Recommended
183
- $fileName = isset( $_GET['feed_name'] ) && ! empty( $_GET['feed_name'] ) ? sanitize_text_field( $_GET['feed_name'] ) : ''; // trigger feed regenerate...
184
  if ( ! empty( $fileName ) ) {
185
  // filename must be wf_config+XXX format for js to work.
186
  $js_opts['generator']['feed'] = 'wf_config' . woo_feed_extract_feed_option_name( $fileName );
74
  wp_register_style( 'slick', plugin_dir_url( __FILE__ ) . 'css/slick' . $ext, array(), $this->version );
75
  wp_register_style( 'slick-theme', plugin_dir_url( __FILE__ ) . 'css/slick-theme' . $ext, array(), $this->version );
76
  $mainDeps = array( 'selectize', 'fancy-select', 'list-tables', 'edit' );
77
+ if ( 'woo-feed_page_webappick-feed-pro-vs-free' === $hook ) {
78
  $mainDeps = array_merge( $mainDeps, array( 'slick', 'slick-theme' ) );
79
  }
80
  }
147
  ],
148
  ],
149
  'nonce' => wp_create_nonce( 'wpf_feed_nonce' ),
150
+ 'is_feed_edit' => isset( $_GET['page'], $_GET['action'] ) && 'webappick-manage-feeds' === $_GET['page'] && 'edit-feed' === $_GET['action'], // phpcs:ignore WordPress.Security.NonceVerification.Recommended
151
+ 'is_feed_add' => isset( $_GET['page'] ) && 'webappick-new-feed' === $_GET['page'], // phpcs:ignore WordPress.Security.NonceVerification.Recommended
152
  'na' => esc_html__( 'N/A', 'woo-feed' ),
153
  'regenerate' => esc_html__( 'Generating...', 'woo-feed' ),
154
  'learn_more' => esc_html__( 'Learn More..', 'woo-feed' ),
178
  ],
179
  );
180
  // phpcs:ignore WordPress.Security.NonceVerification.Recommended
181
+ if ( ( isset( $_GET['feed_created'] ) || isset( $_GET['feed_updated'] ) || isset( $_GET['feed_imported'] ) ) && isset( $_GET['feed_regenerate'] ) && 1 === $_GET['feed_regenerate'] ) {
182
  // phpcs:ignore WordPress.Security.NonceVerification.Recommended
183
+ $fileName = isset( $_GET['feed_name'] ) && ! empty( $_GET['feed_name'] ) ? sanitize_text_field( wp_unslash($_GET['feed_name']) ) : ''; // trigger feed regenerate...
184
  if ( ! empty( $fileName ) ) {
185
  // filename must be wf_config+XXX format for js to work.
186
  $js_opts['generator']['feed'] = 'wf_config' . woo_feed_extract_feed_option_name( $fileName );
admin/class-woo-feed-category-list.php CHANGED
@@ -183,7 +183,7 @@ class Woo_Feed_Category_list extends Woo_Feed_List_Table {
183
 
184
  /** Text displayed when no contact data is available */
185
  public function no_items() {
186
- _e( 'No mapping available.', 'woo-feed' );
187
  }
188
 
189
 
@@ -307,7 +307,7 @@ class Woo_Feed_Category_list extends Woo_Feed_List_Table {
307
  * @see $this->prepare_items()
308
  **************************************************************************/
309
  public function process_bulk_action() {
310
- $nonce = isset( $_REQUEST['_wpnonce'] ) && ! empty( $_REQUEST['_wpnonce'] ) ? sanitize_text_field( $_REQUEST['_wpnonce'] ) : '';
311
  // Detect when a bulk action is being triggered...
312
  if ( 'delete-mapping' === $this->current_action() ) {
313
  // In our file that handles the request, verify the nonce.
@@ -337,7 +337,7 @@ class Woo_Feed_Category_list extends Woo_Feed_List_Table {
337
  }
338
 
339
  // If the delete bulk action is triggered
340
- if ( ( isset( $_POST['mapping'] ) ) && ( isset( $_POST['action'] ) && 'bulk-delete' == $_POST['action'] ) || ( isset( $_POST['action2'] ) && 'bulk-delete' == $_POST['action2'] ) ) {
341
  if ( 'bulk-delete' === $this->current_action() ) {
342
  if ( ! wp_verify_nonce( $nonce, 'bulk-' . $this->_args['plural'] ) ) {
343
  update_option( 'wpf_message', esc_html__( 'Failed To Delete Mapping. You do not have sufficient permission to delete.', 'woo-feed' ), false );
183
 
184
  /** Text displayed when no contact data is available */
185
  public function no_items() {
186
+ esc_html_e( 'No mapping available.', 'woo-feed' );
187
  }
188
 
189
 
307
  * @see $this->prepare_items()
308
  **************************************************************************/
309
  public function process_bulk_action() {
310
+ $nonce = isset( $_REQUEST['_wpnonce'] ) && ! empty( sanitize_text_field( wp_unslash($_REQUEST['_wpnonce']) ) ) ? sanitize_text_field( wp_unslash($_REQUEST['_wpnonce']) ) : '';
311
  // Detect when a bulk action is being triggered...
312
  if ( 'delete-mapping' === $this->current_action() ) {
313
  // In our file that handles the request, verify the nonce.
337
  }
338
 
339
  // If the delete bulk action is triggered
340
+ if ( ( isset( $_POST['mapping'] ) ) && ( isset( $_POST['action'] ) && 'bulk-delete' === $_POST['action'] ) || ( isset( $_POST['action2'] ) && 'bulk-delete' === $_POST['action2'] ) ) {
341
  if ( 'bulk-delete' === $this->current_action() ) {
342
  if ( ! wp_verify_nonce( $nonce, 'bulk-' . $this->_args['plural'] ) ) {
343
  update_option( 'wpf_message', esc_html__( 'Failed To Delete Mapping. You do not have sufficient permission to delete.', 'woo-feed' ), false );
admin/class-woo-feed-manage-list.php CHANGED
@@ -76,7 +76,7 @@ class Woo_Feed_Manage_list extends Woo_Feed_List_Table {
76
  case 'option_name':
77
  return $optionName;
78
  case 'status':
79
- if ( ! isset( $itemInfo['status'] ) || ( isset( $itemInfo['status'] ) && 1 == $itemInfo['status'] ) ) {
80
  return ' <div class="wf_status_wrap"><input style="display: none;" data-index=' . $statusId . ' id=' . $statusId . ' checked class="woo_feed_status_input" type="checkbox" value="' . $getItem . '"/>
81
  <label for=' . $statusId . ' class= "woo-feed_active_status"></label></div>';
82
  } else {
@@ -215,7 +215,7 @@ class Woo_Feed_Manage_list extends Woo_Feed_List_Table {
215
 
216
  /** Text displayed when no data is available */
217
  public function no_items() {
218
- _e( 'No feed available.', 'woo-feed' );
219
  }
220
 
221
 
@@ -351,7 +351,7 @@ class Woo_Feed_Manage_list extends Woo_Feed_List_Table {
351
  // Detect when a bulk action is being triggered...
352
  if ( 'delete-feed' === $this->current_action() ) {
353
  // In our file that handles the request, verify the nonce.
354
- $nonce = isset( $_REQUEST['_wpnonce'] ) && ! empty( $_REQUEST['_wpnonce'] ) ? sanitize_text_field( $_REQUEST['_wpnonce'] ) : '';
355
  if ( ! wp_verify_nonce( $nonce, 'wf_delete_feed' ) ) {
356
  update_option( 'wpf_message', esc_html__( 'Failed To Delete Feed. You do not have sufficient permission to delete.', 'woo-feed' ), false );
357
  wp_safe_redirect( admin_url( 'admin.php?page=webappick-manage-feeds&wpf_message=error' ) );
@@ -372,16 +372,16 @@ class Woo_Feed_Manage_list extends Woo_Feed_List_Table {
372
  // Detect when a bulk action is being triggered...
373
  if ( 'edit-feed' === $this->current_action() ) {
374
  // In our file that handles the request, verify the nonce.
375
- $nonce = isset( $_REQUEST['_wpnonce'] ) && ! empty( $_REQUEST['_wpnonce'] ) ? sanitize_text_field( $_REQUEST['_wpnonce'] ) : '';
376
  if ( ! wp_verify_nonce( $nonce, 'wf_edit_feed' ) ) {
377
  wp_die( esc_html__( 'You do not have sufficient permission to delete!', 'woo-feed' ), 403 );
378
  }
379
  }
380
 
381
  // If the delete bulk action is triggered
382
- if ( ( isset( $_POST['feed'] ) ) && ( isset( $_POST['action'] ) && 'bulk-delete' == $_POST['action'] ) || ( isset( $_POST['action2'] ) && 'bulk-delete' == $_POST['action2'] ) ) {
383
  if ( 'bulk-delete' === $this->current_action() ) {
384
- $nonce = isset( $_REQUEST['_wpnonce'] ) && ! empty( $_REQUEST['_wpnonce'] ) ? sanitize_text_field( $_REQUEST['_wpnonce'] ) : '';
385
  if ( ! wp_verify_nonce( $nonce, 'bulk-' . $this->_args['plural'] ) ) {
386
  wp_die( esc_html__( 'You do not have sufficient permission to delete!', 'woo-feed' ), 403 );
387
  } else {
76
  case 'option_name':
77
  return $optionName;
78
  case 'status':
79
+ if ( ! isset( $itemInfo['status'] ) || ( isset( $itemInfo['status'] ) && 1 === $itemInfo['status'] ) ) {
80
  return ' <div class="wf_status_wrap"><input style="display: none;" data-index=' . $statusId . ' id=' . $statusId . ' checked class="woo_feed_status_input" type="checkbox" value="' . $getItem . '"/>
81
  <label for=' . $statusId . ' class= "woo-feed_active_status"></label></div>';
82
  } else {
215
 
216
  /** Text displayed when no data is available */
217
  public function no_items() {
218
+ esc_html_e( 'No feed available.', 'woo-feed' );
219
  }
220
 
221
 
351
  // Detect when a bulk action is being triggered...
352
  if ( 'delete-feed' === $this->current_action() ) {
353
  // In our file that handles the request, verify the nonce.
354
+ $nonce = isset( $_REQUEST['_wpnonce'] ) && ! empty( wp_unslash( $_REQUEST['_wpnonce'] ) ) ? wp_unslash( sanitize_text_field( $_REQUEST['_wpnonce'] ) ) : '';
355
  if ( ! wp_verify_nonce( $nonce, 'wf_delete_feed' ) ) {
356
  update_option( 'wpf_message', esc_html__( 'Failed To Delete Feed. You do not have sufficient permission to delete.', 'woo-feed' ), false );
357
  wp_safe_redirect( admin_url( 'admin.php?page=webappick-manage-feeds&wpf_message=error' ) );
372
  // Detect when a bulk action is being triggered...
373
  if ( 'edit-feed' === $this->current_action() ) {
374
  // In our file that handles the request, verify the nonce.
375
+ $nonce = isset( $_REQUEST['_wpnonce'] ) && ! empty( wp_unslash( $_REQUEST['_wpnonce'] ) ) ? wp_unslash( sanitize_text_field( $_REQUEST['_wpnonce'] ) ) : '';
376
  if ( ! wp_verify_nonce( $nonce, 'wf_edit_feed' ) ) {
377
  wp_die( esc_html__( 'You do not have sufficient permission to delete!', 'woo-feed' ), 403 );
378
  }
379
  }
380
 
381
  // If the delete bulk action is triggered
382
+ if ( ( isset( $_POST['feed'] ) ) && ( isset( $_POST['action'] ) && 'bulk-delete' === $_POST['action'] ) || ( isset( $_POST['action2'] ) && 'bulk-delete' === $_POST['action2'] ) ) {
383
  if ( 'bulk-delete' === $this->current_action() ) {
384
+ $nonce = isset( $_REQUEST['_wpnonce'] ) && ! empty( $_REQUEST['_wpnonce'] ) ? wp_unslash( sanitize_text_field( $_REQUEST['_wpnonce'] ) ) : '';
385
  if ( ! wp_verify_nonce( $nonce, 'bulk-' . $this->_args['plural'] ) ) {
386
  wp_die( esc_html__( 'You do not have sufficient permission to delete!', 'woo-feed' ), 403 );
387
  } else {
admin/partials/woo-feed-admin-display.php CHANGED
@@ -35,7 +35,7 @@ woo_feed_register_and_do_woo_feed_meta_boxes( $wf_current_screen, $feedRules );
35
  ?>
36
  <div class="wrap wapk-admin" id="Feed">
37
  <div class="wapk-section">
38
- <h1 class="wp-heading-inline"><?php _e( 'New WooCommerce Product Feed', 'woo-feed' ); ?></h1>
39
  </div>
40
  <div class="wapk-section"><?php WPFFWMessage()->displayMessages(); ?></div>
41
  <hr class="wp-header-end">
@@ -49,7 +49,7 @@ woo_feed_register_and_do_woo_feed_meta_boxes( $wf_current_screen, $feedRules );
49
  wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false );
50
  ?>
51
  <div id="poststuff">
52
- <div id="post-body" class="metabox-holder columns-<?php echo 1 == get_current_screen()->get_columns() ? '1' : '2'; ?>">
53
  <div id="post-body-content">
54
  <?php require_once WOO_FEED_FREE_ADMIN_PATH . 'partials/woo-feed-content-settings.php'; ?>
55
  </div>
35
  ?>
36
  <div class="wrap wapk-admin" id="Feed">
37
  <div class="wapk-section">
38
+ <h1 class="wp-heading-inline"><?php esc_html_e( 'New WooCommerce Product Feed', 'woo-feed' ); ?></h1>
39
  </div>
40
  <div class="wapk-section"><?php WPFFWMessage()->displayMessages(); ?></div>
41
  <hr class="wp-header-end">
49
  wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false );
50
  ?>
51
  <div id="poststuff">
52
+ <div id="post-body" class="metabox-holder columns-<?php echo 1 === get_current_screen()->get_columns() ? '1' : '2'; ?>">
53
  <div id="post-body-content">
54
  <?php require_once WOO_FEED_FREE_ADMIN_PATH . 'partials/woo-feed-content-settings.php'; ?>
55
  </div>
admin/partials/woo-feed-category-mapping.php CHANGED
@@ -63,7 +63,7 @@ if ( isset( $_GET['action'], $_GET['cmapping'] ) ) { // phpcs:ignore
63
  <tfoot>
64
  <tr>
65
  <td colspan="2">
66
- <button name="<?php echo isset( $_GET['action'] ) ? esc_attr( sanitize_text_field( $_GET['action'] ) ) : ''; // phpcs:ignore WordPress.Security.NonceVerification.Recommended ?>" type="submit" class="button button-large button-primary"><?php esc_html_e( 'Save Mapping', 'woo-feed' ); ?></button>
67
  </td>
68
  </tr>
69
  </tfoot>
63
  <tfoot>
64
  <tr>
65
  <td colspan="2">
66
+ <button name="<?php echo isset( $_GET['action'] ) ? wp_unslash( esc_attr( sanitize_text_field( $_GET['action'] ) ) ) : ''; // phpcs:ignore WordPress.Security.NonceVerification.Recommended ?>" type="submit" class="button button-large button-primary"><?php esc_html_e( 'Save Mapping', 'woo-feed' ); ?></button>
67
  </td>
68
  </tr>
69
  </tfoot>
admin/partials/woo-feed-content-settings.php CHANGED
@@ -23,14 +23,14 @@ global $feedRules, $wooFeedDropDown, $merchant;
23
  <thead>
24
  <tr>
25
  <th colspan="2" class="woo-feed-table-heading">
26
- <span class="woo-feed-table-heading-title"><?php _e( 'Content Settings', 'woo-feed' ); ?></span>
27
  <?php woo_feed_clear_cache_button(); ?>
28
  </th>
29
  </tr>
30
  </thead>
31
  <tbody>
32
  <tr>
33
- <th><label for="provider"><?php _e( 'Template', 'woo-feed' ); ?> <span class="requiredIn">*</span></label></th>
34
  <td>
35
  <select wftitle="<?php esc_attr_e( 'Select a template', 'woo-feed' ); ?>" name="provider" id="provider" class="generalInput wfmasterTooltip" required>
36
  <?php
@@ -41,13 +41,13 @@ global $feedRules, $wooFeedDropDown, $merchant;
41
  </td>
42
  </tr>
43
  <tr>
44
- <th><label for="filename"><?php _e( 'File Name', 'woo-feed' ); ?> <span class="requiredIn">*</span></label></th>
45
  <td>
46
  <input name="filename" value="<?php echo isset( $feedRules['filename'] ) ? esc_attr( $feedRules['filename'] ) : ''; ?>" type="text" id="filename" class="generalInput wfmasterTooltip" wftitle="<?php esc_attr_e( 'Filename should be unique. Otherwise it will override the existing filename.', 'woo-feed' ); ?>" required>
47
  </td>
48
  </tr>
49
  <tr>
50
- <th><label for="feedType"><?php _e( 'Feed Type', 'woo-feed' ); ?> <span class="requiredIn">*</span></label></th>
51
  <td>
52
  <select name="feedType" id="feedType" class="generalInput" required>
53
  <option value=""></option>
@@ -61,13 +61,13 @@ global $feedRules, $wooFeedDropDown, $merchant;
61
  </td>
62
  </tr>
63
  <tr class="itemWrapper" style="display: none;">
64
- <th><label for="itemsWrapper"><?php _e( 'Items Wrapper', 'woo-feed' ); ?> <span class="requiredIn">*</span></label></th>
65
  <td>
66
  <input name="itemsWrapper" id="itemsWrapper" type="text" value="<?php echo esc_attr( wp_unslash($feedRules['itemsWrapper']) ); ?>" class="generalInput" required="required">
67
  </td>
68
  </tr>
69
  <tr class="itemWrapper" style="display: none;">
70
- <th><label for="itemWrapper"><?php _e( 'Single Item Wrapper', 'woo-feed' ); ?> <span class="requiredIn">*</span></label></th>
71
  <td>
72
  <input name="itemWrapper" id="itemWrapper" type="text" value="<?php echo esc_attr( wp_unslash($feedRules['itemWrapper'] )); ?>" class="generalInput" required="required">
73
  </td>
@@ -86,7 +86,7 @@ global $feedRules, $wooFeedDropDown, $merchant;
86
  */
87
  ?>
88
  <tr class="wf_csvtxt" style="display: none;">
89
- <th><label for="delimiter"><?php _e( 'Delimiter', 'woo-feed' ); ?> <span class="requiredIn">*</span></label></th>
90
  <td>
91
  <select name="delimiter" id="delimiter" class="generalInput">
92
  <?php
@@ -98,7 +98,7 @@ global $feedRules, $wooFeedDropDown, $merchant;
98
  </td>
99
  </tr>
100
  <tr class="wf_csvtxt" style="display: none;">
101
- <th><label for="enclosure"><?php _e( 'Enclosure', 'woo-feed' ); ?> <span class="requiredIn">*</span></label></th>
102
  <td>
103
  <select name="enclosure" id="enclosure" class="generalInput">
104
  <?php
23
  <thead>
24
  <tr>
25
  <th colspan="2" class="woo-feed-table-heading">
26
+ <span class="woo-feed-table-heading-title"><?php esc_html_e( 'Content Settings', 'woo-feed' ); ?></span>
27
  <?php woo_feed_clear_cache_button(); ?>
28
  </th>
29
  </tr>
30
  </thead>
31
  <tbody>
32
  <tr>
33
+ <th><label for="provider"><?php esc_html_e( 'Template', 'woo-feed' ); ?> <span class="requiredIn">*</span></label></th>
34
  <td>
35
  <select wftitle="<?php esc_attr_e( 'Select a template', 'woo-feed' ); ?>" name="provider" id="provider" class="generalInput wfmasterTooltip" required>
36
  <?php
41
  </td>
42
  </tr>
43
  <tr>
44
+ <th><label for="filename"><?php esc_html_e( 'File Name', 'woo-feed' ); ?> <span class="requiredIn">*</span></label></th>
45
  <td>
46
  <input name="filename" value="<?php echo isset( $feedRules['filename'] ) ? esc_attr( $feedRules['filename'] ) : ''; ?>" type="text" id="filename" class="generalInput wfmasterTooltip" wftitle="<?php esc_attr_e( 'Filename should be unique. Otherwise it will override the existing filename.', 'woo-feed' ); ?>" required>
47
  </td>
48
  </tr>
49
  <tr>
50
+ <th><label for="feedType"><?php esc_html_e( 'Feed Type', 'woo-feed' ); ?> <span class="requiredIn">*</span></label></th>
51
  <td>
52
  <select name="feedType" id="feedType" class="generalInput" required>
53
  <option value=""></option>
61
  </td>
62
  </tr>
63
  <tr class="itemWrapper" style="display: none;">
64
+ <th><label for="itemsWrapper"><?php esc_html_e( 'Items Wrapper', 'woo-feed' ); ?> <span class="requiredIn">*</span></label></th>
65
  <td>
66
  <input name="itemsWrapper" id="itemsWrapper" type="text" value="<?php echo esc_attr( wp_unslash($feedRules['itemsWrapper']) ); ?>" class="generalInput" required="required">
67
  </td>
68
  </tr>
69
  <tr class="itemWrapper" style="display: none;">
70
+ <th><label for="itemWrapper"><?php esc_html_e( 'Single Item Wrapper', 'woo-feed' ); ?> <span class="requiredIn">*</span></label></th>
71
  <td>
72
  <input name="itemWrapper" id="itemWrapper" type="text" value="<?php echo esc_attr( wp_unslash($feedRules['itemWrapper'] )); ?>" class="generalInput" required="required">
73
  </td>
86
  */
87
  ?>
88
  <tr class="wf_csvtxt" style="display: none;">
89
+ <th><label for="delimiter"><?php esc_html_e( 'Delimiter', 'woo-feed' ); ?> <span class="requiredIn">*</span></label></th>
90
  <td>
91
  <select name="delimiter" id="delimiter" class="generalInput">
92
  <?php
98
  </td>
99
  </tr>
100
  <tr class="wf_csvtxt" style="display: none;">
101
+ <th><label for="enclosure"><?php esc_html_e( 'Enclosure', 'woo-feed' ); ?> <span class="requiredIn">*</span></label></th>
102
  <td>
103
  <select name="enclosure" id="enclosure" class="generalInput">
104
  <?php
admin/partials/woo-feed-edit-config.php CHANGED
@@ -7,13 +7,13 @@ if ( ! defined( 'ABSPATH' ) ) {
7
  <thead>
8
  <tr>
9
  <th></th>
10
- <th><?php echo esc_html( ucfirst( $provider ) ); ?> <?php _e( 'Attributes', 'woo-feed' ); ?></th>
11
- <th><?php _e( 'Prefix', 'woo-feed' ); ?></th>
12
- <th><?php _e( 'Type', 'woo-feed' ); ?></th>
13
- <th><?php _e( 'Value', 'woo-feed' ); ?></th>
14
- <th><?php _e( 'Suffix', 'woo-feed' ); ?></th>
15
- <th><?php _e( 'Output Type', 'woo-feed' ); ?></th>
16
- <th><?php _e( 'Command', 'woo-feed' ); ?></th>
17
  <th></th>
18
  </tr>
19
  </thead>
@@ -50,19 +50,19 @@ if ( ! defined( 'ABSPATH' ) ) {
50
  </td>
51
  <td>
52
  <select name="type[<?php echo esc_attr( $k ); ?>]" class="attr_type wfnoempty">
53
- <option <?php echo ( 'attribute' == $attr_type[ $k ] ) ? 'selected="selected" ' : ''; ?>value="attribute"><?php _e( 'Attribute', 'woo-feed' ); ?></option>
54
- <option <?php echo ( 'pattern' == $attr_type[ $k ] ) ? 'selected="selected" ' : ''; ?> value="pattern"><?php _e( 'Pattern', 'woo-feed' ); ?></option>
55
  </select>
56
  </td>
57
  <td>
58
- <select <?php echo ( 'attribute' == $attr_type[ $k ] ) ? '' : 'style=" display: none;" '; ?>name="attributes[<?php echo esc_attr( $k ); ?>]" class="wf_attr wf_attributes">
59
  <?php
60
  // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
61
  echo $wooFeedDropDown->product_attributes_dropdown( esc_attr( $wooAttributes[ $k ] ) );
62
  ?>
63
  </select>
64
  <?php if ( woo_feed_merchant_require_google_category( $feedRules['provider'], $mAttribute ) ) { ?>
65
- <span <?php echo ( 'pattern' == $attr_type[ $k ] ) ? '' : 'style=" display: none;" '; ?>class="wf_default wf_attributes">
66
  <select name="default[<?php echo esc_attr( $k ); ?>]" class="selectize" data-placeholder="<?php esc_attr_e( 'Select A Category', 'woo-feed' ); ?>">
67
  <?php
68
  // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
@@ -72,7 +72,7 @@ if ( ! defined( 'ABSPATH' ) ) {
72
  </span>
73
  <span style="font-size:x-small;"><a style="color: red" href="http://webappick.helpscoutdocs.com/article/19-how-to-map-store-category-with-merchant-category" target="_blank">Learn More..</a></span>
74
  <?php } else { ?>
75
- <input <?php echo ( 'pattern' == $attr_type[ $k ] ) ? '' : 'style=" display: none;"'; ?>autocomplete="off" class="wf_default wf_attributes " type="text" name="default[<?php echo esc_attr( $k ); ?>]" value="<?php echo esc_attr( $default[ $k ] ); ?>"/>
76
  <?php } ?>
77
  </td>
78
  <td>
@@ -121,8 +121,8 @@ if ( ! defined( 'ABSPATH' ) ) {
121
  </td>
122
  <td>
123
  <select name="type[__idx__]" class="attr_type wfnoempty">
124
- <option value="attribute"><?php _e( 'Attribute', 'woo-feed' ); ?></option>
125
- <option value="pattern"><?php _e( 'Pattern', 'woo-feed' ); ?></option>
126
  </select>
127
  </td>
128
  <td>
@@ -153,7 +153,7 @@ if ( ! defined( 'ABSPATH' ) ) {
153
  </td>
154
  </tr>
155
  </script>
156
- <button type="button" class="button-small button-primary" id="wf_newRow"><?php _e( 'Add New Attribute', 'woo-feed' ); ?></button>
157
  </td>
158
  <td colspan="6"></td>
159
  </tr>
7
  <thead>
8
  <tr>
9
  <th></th>
10
+ <th><?php echo esc_html( ucfirst( $provider ) ); ?> <?php esc_html_e( 'Attributes', 'woo-feed' ); ?></th>
11
+ <th><?php esc_html_e( 'Prefix', 'woo-feed' ); ?></th>
12
+ <th><?php esc_html_e( 'Type', 'woo-feed' ); ?></th>
13
+ <th><?php esc_html_e( 'Value', 'woo-feed' ); ?></th>
14
+ <th><?php esc_html_e( 'Suffix', 'woo-feed' ); ?></th>
15
+ <th><?php esc_html_e( 'Output Type', 'woo-feed' ); ?></th>
16
+ <th><?php esc_html_e( 'Command', 'woo-feed' ); ?></th>
17
  <th></th>
18
  </tr>
19
  </thead>
50
  </td>
51
  <td>
52
  <select name="type[<?php echo esc_attr( $k ); ?>]" class="attr_type wfnoempty">
53
+ <option <?php echo ( 'attribute' === $attr_type[ $k ] ) ? 'selected="selected" ' : ''; ?>value="attribute"><?php esc_html_e( 'Attribute', 'woo-feed' ); ?></option>
54
+ <option <?php echo ( 'pattern' === $attr_type[ $k ] ) ? 'selected="selected" ' : ''; ?> value="pattern"><?php esc_html_e( 'Pattern', 'woo-feed' ); ?></option>
55
  </select>
56
  </td>
57
  <td>
58
+ <select <?php echo ( 'attribute' === $attr_type[ $k ] ) ? '' : 'style=" display: none;" '; ?>name="attributes[<?php echo esc_attr( $k ); ?>]" class="wf_attr wf_attributes">
59
  <?php
60
  // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
61
  echo $wooFeedDropDown->product_attributes_dropdown( esc_attr( $wooAttributes[ $k ] ) );
62
  ?>
63
  </select>
64
  <?php if ( woo_feed_merchant_require_google_category( $feedRules['provider'], $mAttribute ) ) { ?>
65
+ <span <?php echo ( 'pattern' === $attr_type[ $k ] ) ? '' : 'style=" display: none;" '; ?>class="wf_default wf_attributes">
66
  <select name="default[<?php echo esc_attr( $k ); ?>]" class="selectize" data-placeholder="<?php esc_attr_e( 'Select A Category', 'woo-feed' ); ?>">
67
  <?php
68
  // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
72
  </span>
73
  <span style="font-size:x-small;"><a style="color: red" href="http://webappick.helpscoutdocs.com/article/19-how-to-map-store-category-with-merchant-category" target="_blank">Learn More..</a></span>
74
  <?php } else { ?>
75
+ <input <?php echo ( 'pattern' === $attr_type[ $k ] ) ? '' : 'style=" display: none;"'; ?>autocomplete="off" class="wf_default wf_attributes " type="text" name="default[<?php echo esc_attr( $k ); ?>]" value="<?php echo esc_attr( $default[ $k ] ); ?>"/>
76
  <?php } ?>
77
  </td>
78
  <td>
121
  </td>
122
  <td>
123
  <select name="type[__idx__]" class="attr_type wfnoempty">
124
+ <option value="attribute"><?php esc_html_e( 'Attribute', 'woo-feed' ); ?></option>
125
+ <option value="pattern"><?php esc_html_e( 'Pattern', 'woo-feed' ); ?></option>
126
  </select>
127
  </td>
128
  <td>
153
  </td>
154
  </tr>
155
  </script>
156
+ <button type="button" class="button-small button-primary" id="wf_newRow"><?php esc_html_e( 'Add New Attribute', 'woo-feed' ); ?></button>
157
  </td>
158
  <td colspan="6"></td>
159
  </tr>
admin/partials/woo-feed-edit-filter.php CHANGED
@@ -7,7 +7,7 @@ if ( ! defined( 'ABSPATH' ) ) {
7
  <tbody>
8
 
9
  <tr>
10
- <td colspan="2"><?php _e( 'Campaign URL Builder', 'woo-feed' ); ?></td>
11
  </tr>
12
  <tr>
13
  <td colspan="2">
7
  <tbody>
8
 
9
  <tr>
10
+ <td colspan="2"><?php esc_html_e( 'Campaign URL Builder', 'woo-feed' ); ?></td>
11
  </tr>
12
  <tr>
13
  <td colspan="2">
admin/partials/woo-feed-edit-ftp.php CHANGED
@@ -12,50 +12,50 @@ if ( ! defined( 'ABSPATH' ) ) {
12
  <?php } else { ?>
13
  <tbody>
14
  <tr>
15
- <td><label for="ftpenabled"><?php _e( 'Enabled', 'woo-feed' ); ?></label></td>
16
  <td>
17
  <select name="ftpenabled" id="ftpenabled">
18
- <option <?php echo ( '0' == $feedRules['ftpenabled'] ) ? 'selected="selected" ' : ''; ?>value="0"><?php _e( 'Disabled', 'woo-feed' ); ?></option>
19
- <option <?php echo ( '1' == $feedRules['ftpenabled'] ) ? 'selected="selected" ' : ''; ?>value="1"><?php _e( 'Enabled', 'woo-feed' ); ?></option>
20
  </select>
21
  </td>
22
  </tr>
23
  <tr>
24
- <td><label for="ftporsftp"><?php _e( 'Server Type', 'woo-feed' ); ?></label></td>
25
  <td>
26
  <select name="ftporsftp" id="ftporsftp" class="ftporsftp">
27
- <option <?php echo ( 'ftp' == $feedRules['ftporsftp'] ) ? 'selected="selected" ' : ''; ?> value="ftp"><?php _e( 'FTP', 'woo-feed' ); ?></option>
28
- <option <?php echo ( 'sftp' == $feedRules['ftporsftp'] ) ? 'selected="selected" ' : ''; ?>value="sftp"><?php _e( 'SFTP', 'woo-feed' ); ?></option>
29
  </select>
30
  <span class="ssh2_status"></span>
31
  </td>
32
  </tr>
33
  <tr>
34
- <td><label for="ftphost"><?php _e( 'Host Name', 'woo-feed' ); ?></label></td>
35
  <td><input type="text" id="ftphost" value="<?php echo esc_attr( $feedRules['ftphost'] ); ?>" name="ftphost" autocomplete="off"/></td>
36
  </tr>
37
  <tr>
38
- <td><label for="ftpport"><?php _e( 'Port', 'woo-feed' ); ?></label></td>
39
  <td><input type="text" id="ftpport" value="<?php echo isset( $feedRules['ftpport'] ) ? esc_attr( $feedRules['ftpport'] ) : 21; ?>" name="ftpport" autocomplete="off"/></td>
40
  </tr>
41
  <tr>
42
- <td><label for="ftpuser"><?php _e( 'User Name', 'woo-feed' ); ?></label></td>
43
  <td><input type="text" id="ftpuser" value="<?php echo esc_attr( $feedRules['ftpuser'] ); ?>" name="ftpuser" autocomplete="off"/></td>
44
  </tr>
45
  <tr>
46
- <td><label for="ftppassword"><?php _e( 'Password', 'woo-feed' ); ?></label></td>
47
  <td><input type="password" id="ftppassword" value="<?php echo esc_attr( $feedRules['ftppassword'] ); ?>" name="ftppassword" autocomplete="off"/></td>
48
  </tr>
49
  <tr>
50
- <td><label for="ftppath"><?php _e( 'Path', 'woo-feed' ); ?></label></td>
51
  <td><input type="text" id="ftppath" value="<?php echo esc_attr( $feedRules['ftppath'] ); ?>" name="ftppath" autocomplete="off"/></td>
52
  </tr>
53
  <tr>
54
- <td><label for="ftpmode"><?php _e( 'Connection Mode', 'woo-feed' ); ?></label></td>
55
  <td>
56
  <select name="ftpmode" id="ftpmode" class="ftpmode">
57
- <option <?php echo (isset($feedRules['ftpmode']) && 'active' == $feedRules['ftpmode'] ) ? 'selected="selected" ' : ''; ?> value="active"><?php _e( 'Active', 'woo-feed' ); ?></option>
58
- <option <?php echo (isset($feedRules['ftpmode']) && 'passive' == $feedRules['ftpmode'] ) ? 'selected="selected" ' : ''; ?>value="passive"><?php _e( 'Passive', 'woo-feed' ); ?></option>
59
  </select>
60
  </td>
61
  </tr>
12
  <?php } else { ?>
13
  <tbody>
14
  <tr>
15
+ <td><label for="ftpenabled"><?php esc_html_e( 'Enabled', 'woo-feed' ); ?></label></td>
16
  <td>
17
  <select name="ftpenabled" id="ftpenabled">
18
+ <option <?php echo ( '0' === $feedRules['ftpenabled'] ) ? 'selected="selected" ' : ''; ?>value="0"><?php esc_html_e( 'Disabled', 'woo-feed' ); ?></option>
19
+ <option <?php echo ( '1' === $feedRules['ftpenabled'] ) ? 'selected="selected" ' : ''; ?>value="1"><?php esc_html_e( 'Enabled', 'woo-feed' ); ?></option>
20
  </select>
21
  </td>
22
  </tr>
23
  <tr>
24
+ <td><label for="ftporsftp"><?php esc_html_e( 'Server Type', 'woo-feed' ); ?></label></td>
25
  <td>
26
  <select name="ftporsftp" id="ftporsftp" class="ftporsftp">
27
+ <option <?php echo ( 'ftp' === $feedRules['ftporsftp'] ) ? 'selected="selected" ' : ''; ?> value="ftp"><?php esc_html_e( 'FTP', 'woo-feed' ); ?></option>
28
+ <option <?php echo ( 'sftp' === $feedRules['ftporsftp'] ) ? 'selected="selected" ' : ''; ?>value="sftp"><?php esc_html_e( 'SFTP', 'woo-feed' ); ?></option>
29
  </select>
30
  <span class="ssh2_status"></span>
31
  </td>
32
  </tr>
33
  <tr>
34
+ <td><label for="ftphost"><?php esc_html_e( 'Host Name', 'woo-feed' ); ?></label></td>
35
  <td><input type="text" id="ftphost" value="<?php echo esc_attr( $feedRules['ftphost'] ); ?>" name="ftphost" autocomplete="off"/></td>
36
  </tr>
37
  <tr>
38
+ <td><label for="ftpport"><?php esc_html_e( 'Port', 'woo-feed' ); ?></label></td>
39
  <td><input type="text" id="ftpport" value="<?php echo isset( $feedRules['ftpport'] ) ? esc_attr( $feedRules['ftpport'] ) : 21; ?>" name="ftpport" autocomplete="off"/></td>
40
  </tr>
41
  <tr>
42
+ <td><label for="ftpuser"><?php esc_html_e( 'User Name', 'woo-feed' ); ?></label></td>
43
  <td><input type="text" id="ftpuser" value="<?php echo esc_attr( $feedRules['ftpuser'] ); ?>" name="ftpuser" autocomplete="off"/></td>
44
  </tr>
45
  <tr>
46
+ <td><label for="ftppassword"><?php esc_html_e( 'Password', 'woo-feed' ); ?></label></td>
47
  <td><input type="password" id="ftppassword" value="<?php echo esc_attr( $feedRules['ftppassword'] ); ?>" name="ftppassword" autocomplete="off"/></td>
48
  </tr>
49
  <tr>
50
+ <td><label for="ftppath"><?php esc_html_e( 'Path', 'woo-feed' ); ?></label></td>
51
  <td><input type="text" id="ftppath" value="<?php echo esc_attr( $feedRules['ftppath'] ); ?>" name="ftppath" autocomplete="off"/></td>
52
  </tr>
53
  <tr>
54
+ <td><label for="ftpmode"><?php esc_html_e( 'Connection Mode', 'woo-feed' ); ?></label></td>
55
  <td>
56
  <select name="ftpmode" id="ftpmode" class="ftpmode">
57
+ <option <?php echo (isset($feedRules['ftpmode']) && 'active' === $feedRules['ftpmode'] ) ? 'selected="selected" ' : ''; ?> value="active"><?php esc_html_e( 'Active', 'woo-feed' ); ?></option>
58
+ <option <?php echo (isset($feedRules['ftpmode']) && 'passive' === $feedRules['ftpmode'] ) ? 'selected="selected" ' : ''; ?>value="passive"><?php esc_html_e( 'Passive', 'woo-feed' ); ?></option>
59
  </select>
60
  </td>
61
  </tr>
admin/partials/woo-feed-edit-tabs.php CHANGED
@@ -93,9 +93,9 @@ $isEdit = defined( 'WOO_FEED_EDIT_CONFIG' ) && WOO_FEED_EDIT_CONFIG;
93
  </td>
94
  <td>
95
  <?php if ( defined( 'WOO_FEED_EDIT_CONFIG' ) && WOO_FEED_EDIT_CONFIG ) { ?>
96
- <button name="save_feed_config" type="submit" class="wfbtn updatefeed"><?php _e( 'Save', 'woo-feed' ); ?></button>
97
  <?php } ?>
98
- <button name="<?php echo isset( $_GET['action'] ) ? esc_attr( sanitize_text_field( $_GET['action'] ) ) : ''; // phpcs:ignore WordPress.Security.NonceVerification.Recommended ?>" type="submit" class="wfbtn updatefeed"><?php _e( 'Update and Generate Feed', 'woo-feed' ); ?></button>
99
  </td>
100
  </tr>
101
  </table>
93
  </td>
94
  <td>
95
  <?php if ( defined( 'WOO_FEED_EDIT_CONFIG' ) && WOO_FEED_EDIT_CONFIG ) { ?>
96
+ <button name="save_feed_config" type="submit" class="wfbtn updatefeed"><?php esc_html_e( 'Save', 'woo-feed' ); ?></button>
97
  <?php } ?>
98
+ <button name="<?php echo isset( $_GET['action'] ) ? esc_attr( wp_unslash( sanitize_text_field( $_GET['action'] ) ) ) : ''; // phpcs:ignore WordPress.Security.NonceVerification.Recommended ?>" type="submit" class="wfbtn updatefeed"><?php _e( 'Update and Generate Feed', 'woo-feed' ); ?></button>
99
  </td>
100
  </tr>
101
  </table>
admin/partials/woo-feed-edit-template.php CHANGED
@@ -35,7 +35,7 @@ woo_feed_register_and_do_woo_feed_meta_boxes( $wf_current_screen, $feedRules );
35
  <!--suppress SpellCheckingInspection, HtmlFormInputWithoutLabel, HtmlDeprecatedAttribute -->
36
  <div class="wrap wapk-admin" id="Feed">
37
  <div class="wapk-section">
38
- <h2><?php _e( 'Edit WooCommerce Product Feed', 'woo-feed' ); ?></h2>
39
  </div>
40
  <div class="wapk-section"><?php WPFFWMessage()->displayMessages(); ?></div>
41
  <div class="wapk-section">
@@ -48,7 +48,7 @@ woo_feed_register_and_do_woo_feed_meta_boxes( $wf_current_screen, $feedRules );
48
  wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false );
49
  ?>
50
  <div id="poststuff">
51
- <div id="post-body" class="metabox-holder columns-<?php echo 1 == get_current_screen()->get_columns() ? '1' : '2'; ?>">
52
  <div id="post-body-content">
53
  <?php require_once WOO_FEED_FREE_ADMIN_PATH . 'partials/woo-feed-content-settings.php'; ?>
54
  </div>
35
  <!--suppress SpellCheckingInspection, HtmlFormInputWithoutLabel, HtmlDeprecatedAttribute -->
36
  <div class="wrap wapk-admin" id="Feed">
37
  <div class="wapk-section">
38
+ <h2><?php sanitize_text_field( $_GET['action'] )( 'Edit WooCommerce Product Feed', 'woo-feed' ); ?></h2>
39
  </div>
40
  <div class="wapk-section"><?php WPFFWMessage()->displayMessages(); ?></div>
41
  <div class="wapk-section">
48
  wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false );
49
  ?>
50
  <div id="poststuff">
51
+ <div id="post-body" class="metabox-holder columns-<?php echo 1 === get_current_screen()->get_columns() ? '1' : '2'; ?>">
52
  <div id="post-body-content">
53
  <?php require_once WOO_FEED_FREE_ADMIN_PATH . 'partials/woo-feed-content-settings.php'; ?>
54
  </div>
admin/partials/woo-feed-manage-list.php CHANGED
@@ -17,10 +17,10 @@ $message = array();
17
  global $regenerating, $regeneratingName, $plugin_page;
18
  $regenerating = false;
19
  // phpcs:ignore WordPress.Security.NonceVerification.Recommended
20
- if ( ( isset( $_GET['feed_created'] ) || isset( $_GET['feed_updated'] ) || isset( $_GET['feed_imported'] ) ) && isset( $_GET['feed_regenerate'] ) && 1 == $_GET['feed_regenerate'] ) {
21
  // filename must be wf_config+XXX format for js to work.
22
  // phpcs:ignore WordPress.Security.NonceVerification.Recommended
23
- $fileName = isset( $_GET['feed_name'] ) && ! empty( $_GET['feed_name'] ) ? sanitize_text_field( $_GET['feed_name'] ) : ''; // trigger feed regenerate...
24
  if ( ! empty( $fileName ) ) {
25
  $fileName = woo_feed_extract_feed_option_name( $fileName );
26
  $regeneratingName = $fileName;
@@ -31,9 +31,9 @@ if ( ( isset( $_GET['feed_created'] ) || isset( $_GET['feed_updated'] ) || isset
31
  ?>
32
  <div class="wrap wapk-admin">
33
  <div class="wapk-section">
34
- <h1 class="wp-heading-inline"><?php _e( 'Manage Feed', 'woo-feed' ); ?></h1>
35
- <a href="<?php echo esc_url( admin_url( 'admin.php?page=webappick-new-feed' ) ); ?>" class="page-title-action"><?php _e( 'New Feed', 'woo-feed' ); ?></a>
36
- <a href="#TB_inline?&width=300&height=152&inlineId=wpf_importer" name="Import Feed Config" class="thickbox page-title-action"><?php _e( 'Import Feed', 'woo-feed' ); ?></a>
37
  <div id="wpf_importer" style="display: none;">
38
  <form action="<?php echo esc_url( admin_url( 'admin-post.php?action=wpf_import' ) ); ?>" method="post" enctype="multipart/form-data">
39
  <?php wp_nonce_field( 'wpf_import' ); ?>
@@ -94,7 +94,7 @@ if ( ( isset( $_GET['feed_created'] ) || isset( $_GET['feed_updated'] ) || isset
94
  <tr>
95
  <th>
96
  <b><?php esc_html_e( 'Auto Update Feed Interval', 'woo-feed' ); ?></b>
97
- <span style="float: right;"><?php echo sprintf( 'Version %s', WOO_FEED_FREE_VERSION ); ?></span>
98
  </th>
99
  </tr>
100
  </thead>
@@ -103,7 +103,7 @@ if ( ( isset( $_GET['feed_created'] ) || isset( $_GET['feed_updated'] ) || isset
103
  <td>
104
  <form action="" method="post" style="display: flex;align-items: center;">
105
  <?php wp_nonce_field( 'wf_schedule', 'wf_schedule_nonce' ); ?>
106
- <label for="wf_schedule"><b><?php _e( 'Interval', 'woo-feed' ); ?></b></label>
107
  <select name="wf_schedule" id="wf_schedule" style="margin: 0 5px;">
108
  <?php
109
  $interval = get_option( 'wf_schedule' );
17
  global $regenerating, $regeneratingName, $plugin_page;
18
  $regenerating = false;
19
  // phpcs:ignore WordPress.Security.NonceVerification.Recommended
20
+ if ( ( isset( $_GET['feed_created'] ) || isset( $_GET['feed_updated'] ) || isset( $_GET['feed_imported'] ) ) && isset( $_GET['feed_regenerate'] ) && 1 === $_GET['feed_regenerate'] ) {
21
  // filename must be wf_config+XXX format for js to work.
22
  // phpcs:ignore WordPress.Security.NonceVerification.Recommended
23
+ $fileName = isset( $_GET['feed_name'] ) && ! empty( $_GET['feed_name'] ) ? wp_unslash( sanitize_text_field( $_GET['feed_name'] ) ) : ''; // trigger feed regenerate...
24
  if ( ! empty( $fileName ) ) {
25
  $fileName = woo_feed_extract_feed_option_name( $fileName );
26
  $regeneratingName = $fileName;
31
  ?>
32
  <div class="wrap wapk-admin">
33
  <div class="wapk-section">
34
+ <h1 class="wp-heading-inline"><?php esc_html_e( 'Manage Feed', 'woo-feed' ); ?></h1>
35
+ <a href="<?php echo esc_url( admin_url( 'admin.php?page=webappick-new-feed' ) ); ?>" class="page-title-action"><?php esc_html_e( 'New Feed', 'woo-feed' ); ?></a>
36
+ <a href="#TB_inline?&width=300&height=152&inlineId=wpf_importer" name="Import Feed Config" class="thickbox page-title-action"><?php esc_html_e( 'Import Feed', 'woo-feed' ); ?></a>
37
  <div id="wpf_importer" style="display: none;">
38
  <form action="<?php echo esc_url( admin_url( 'admin-post.php?action=wpf_import' ) ); ?>" method="post" enctype="multipart/form-data">
39
  <?php wp_nonce_field( 'wpf_import' ); ?>
94
  <tr>
95
  <th>
96
  <b><?php esc_html_e( 'Auto Update Feed Interval', 'woo-feed' ); ?></b>
97
+ <span style="float: right;"><?php echo sprintf( 'Version %s', esc_html(WOO_FEED_FREE_VERSION ) ); ?></span>
98
  </th>
99
  </tr>
100
  </thead>
103
  <td>
104
  <form action="" method="post" style="display: flex;align-items: center;">
105
  <?php wp_nonce_field( 'wf_schedule', 'wf_schedule_nonce' ); ?>
106
+ <label for="wf_schedule"><b><?php esc_html_e( 'Interval', 'woo-feed' ); ?></b></label>
107
  <select name="wf_schedule" id="wf_schedule" style="margin: 0 5px;">
108
  <?php
109
  $interval = get_option( 'wf_schedule' );
admin/partials/woo-feed-pro-vs-free.php CHANGED
@@ -398,7 +398,7 @@ $testimonials = array(
398
  <span class="wapk-price__table__currency"><?php echo esc_html( $price['currency'] ); ?></span>
399
  <?php } ?>
400
  <span class="wapk-price__table__amount"><?php
401
- if ( 0 == $integer && 0 == $decimal ) printf( '<span class="free">%s</span>', esc_html_x( 'Free', 'Free Package Price Display', 'woo-feed' ) );
402
  if ( $integer > 0 || $decimal > 0 ) printf( '<span class="integer-part">%d</span>', esc_html( $integer ) );
403
  if ( $decimal > 0 ) printf( '<span class="decimal-part">.%d</span>', esc_html( $decimal ) );
404
  if ( ! empty( $price['period'] ) ) printf( '<span class="period">/%s</span>', esc_html( $price['period'] ) );
@@ -490,7 +490,7 @@ $testimonials = array(
490
  <span class="dashicons dashicons-editor-help" aria-hidden="true"></span>
491
  </div>
492
  <div class="wapk-cta-content">
493
- <h2><?php _e( 'Still need help?', 'woo-feed' ); ?></h2>
494
  <p><?php _e( 'Have we not answered your question?<br>Don\'t worry, you can contact us for more information...', 'woo-feed') ?></p>
495
  </div>
496
  <div class="wapk-cta-action">
398
  <span class="wapk-price__table__currency"><?php echo esc_html( $price['currency'] ); ?></span>
399
  <?php } ?>
400
  <span class="wapk-price__table__amount"><?php
401
+ if ( 0 === $integer && 0 === $decimal ) printf( '<span class="free">%s</span>', esc_html_x( 'Free', 'Free Package Price Display', 'woo-feed' ) );
402
  if ( $integer > 0 || $decimal > 0 ) printf( '<span class="integer-part">%d</span>', esc_html( $integer ) );
403
  if ( $decimal > 0 ) printf( '<span class="decimal-part">.%d</span>', esc_html( $decimal ) );
404
  if ( ! empty( $price['period'] ) ) printf( '<span class="period">/%s</span>', esc_html( $price['period'] ) );
490
  <span class="dashicons dashicons-editor-help" aria-hidden="true"></span>
491
  </div>
492
  <div class="wapk-cta-content">
493
+ <h2><?php esc_html_e( 'Still need help?', 'woo-feed' ); ?></h2>
494
  <p><?php _e( 'Have we not answered your question?<br>Don\'t worry, you can contact us for more information...', 'woo-feed') ?></p>
495
  </div>
496
  <div class="wapk-cta-action">
includes/helper.php CHANGED
@@ -2780,5 +2780,31 @@ if ( ! function_exists( 'woo_feed_clear_cache_data' ) ) {
2780
  }
2781
  add_action( 'wp_ajax_clear_cache_data', 'woo_feed_clear_cache_data' );
2782
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2783
 
2784
  // End of file helper.php.
2780
  }
2781
  add_action( 'wp_ajax_clear_cache_data', 'woo_feed_clear_cache_data' );
2782
 
2783
+ if ( ! function_exists('woo_feed_get_terms_list_hierarchical_order') ) {
2784
+ /**
2785
+ * Get product terms list by hierarchical order.
2786
+ *
2787
+ * @param int $id post id
2788
+ * @param string $taxonomy post taxonomy
2789
+ * @since 4.2.1
2790
+ */
2791
+ function woo_feed_get_terms_list_hierarchical_order( $id, $taxonomy = 'product_cat' ) {
2792
+ $terms = get_the_terms($id, $taxonomy);
2793
+ if ( $terms ) {
2794
+ foreach ( $terms as $key => $term ) {
2795
+ if ( $term->parent != 0 ) {
2796
+ $terms[] = $term;
2797
+ unset($terms[ $key ]);
2798
+ }
2799
+ }
2800
+
2801
+ //get terms name from the term array
2802
+ $product_terms_names = wp_list_pluck( $terms, 'name' );
2803
+
2804
+ return implode(">", $product_terms_names);
2805
+ } // end if terms
2806
+ }
2807
+ }
2808
+
2809
 
2810
  // End of file helper.php.
woo-feed.php CHANGED
@@ -11,7 +11,7 @@
11
  * Plugin URI: https://webappick.com/
12
  * Description: Easily generate woocommerce product feed for any marketing channel like Google Shopping(Merchant), Facebook Remarketing, Bing, eBay & more. Support 100+ Merchants.
13
  *
14
- * Version: 3.9.9
15
  * Author: WebAppick
16
  * Author URI: https://webappick.com/
17
  * License: GPL v2
@@ -39,7 +39,7 @@ if ( ! defined( 'WOO_FEED_FREE_VERSION' ) ) {
39
  * @var string
40
  * @since 3.1.6
41
  */
42
- define( 'WOO_FEED_FREE_VERSION', '3.9.9' );
43
  }
44
 
45
  if ( ! defined( 'WOO_FEED_FREE_FILE' ) ) {
11
  * Plugin URI: https://webappick.com/
12
  * Description: Easily generate woocommerce product feed for any marketing channel like Google Shopping(Merchant), Facebook Remarketing, Bing, eBay & more. Support 100+ Merchants.
13
  *
14
+ * Version: 4.0.0
15
  * Author: WebAppick
16
  * Author URI: https://webappick.com/
17
  * License: GPL v2
39
  * @var string
40
  * @since 3.1.6
41
  */
42
+ define( 'WOO_FEED_FREE_VERSION', '4.0.0' );
43
  }
44
 
45
  if ( ! defined( 'WOO_FEED_FREE_FILE' ) ) {