Product Feed PRO for WooCommerce - Version 11.8.4

Version Description

Added an option to enable/disable returning of only basic attributes in the field mapping and rules and filters drop-downs

Download this release

Release Info

Developer jorisverwater
Plugin Icon 128x128 Product Feed PRO for WooCommerce
Version 11.8.4
Comparing to
See all releases

Code changes from version 11.8.3 to 11.8.4

classes/class-attributes.php CHANGED
@@ -82,13 +82,18 @@ private function get_custom_attributes() {
82
  if ( ! function_exists( 'woosea_get_meta_keys_for_post_type' ) ) :
83
 
84
  function woosea_get_meta_keys_for_post_type( $post_type, $sample_size = 'modified' ) {
85
- $meta_keys = array();
86
- $posts = get_posts( array( 'post_type' => $post_type, 'limit' => $sample_size ) );
87
- //$posts = get_posts( array( 'post_type' => $post_type, 'numberposts' => -1 ) );
 
 
 
 
 
88
 
89
  foreach ( $posts as $post ) {
90
  $post_meta_keys = get_post_custom_keys( $post->ID );
91
- $post_meta_keys = array_map('ucfirst', $post_meta_keys);
92
  $meta_keys = array_merge( $meta_keys, $post_meta_keys );
93
  }
94
 
82
  if ( ! function_exists( 'woosea_get_meta_keys_for_post_type' ) ) :
83
 
84
  function woosea_get_meta_keys_for_post_type( $post_type, $sample_size = 'modified' ) {
85
+ $meta_keys = array();
86
+
87
+ $add_woosea_basic = get_option ('add_woosea_basic');
88
+ if($add_woosea_basic == "yes"){
89
+ $posts = get_posts( array( 'post_type' => $post_type, 'limit' => $sample_size ) );
90
+ } else {
91
+ $posts = get_posts( array( 'post_type' => $post_type, 'numberposts' => -1 ) );
92
+ }
93
 
94
  foreach ( $posts as $post ) {
95
  $post_meta_keys = get_post_custom_keys( $post->ID );
96
+ //$post_meta_keys = array_map('ucfirst', $post_meta_keys);
97
  $meta_keys = array_merge( $meta_keys, $post_meta_keys );
98
  }
99
 
js/woosea_key.js CHANGED
@@ -26,7 +26,7 @@ jQuery(document).ready(function($) {
26
  var license_key = $('#license-key').val();
27
 
28
  jQuery.ajax({
29
- url: 'https://www.adtribes.io/check/license.php?key=' + license_key + '&email=' + license_email + '&domain=' + root_domain + '&version=11.8.3',
30
  jsonp: 'callback',
31
  dataType: 'jsonp',
32
  type: 'GET',
26
  var license_key = $('#license-key').val();
27
 
28
  jQuery.ajax({
29
+ url: 'https://www.adtribes.io/check/license.php?key=' + license_key + '&email=' + license_email + '&domain=' + root_domain + '&version=11.8.4',
30
  jsonp: 'callback',
31
  dataType: 'jsonp',
32
  type: 'GET',
js/woosea_manage.js CHANGED
@@ -308,6 +308,26 @@ jQuery(function($) {
308
  }
309
  })
310
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
311
  // Check if user would like to enable addition of CDATA
312
  $('#add_woosea_cdata').on('change', function(){ // on change of state
313
  if(this.checked){
308
  }
309
  })
310
 
311
+ // Check if user would like to enable only basis attributes in drop-downs
312
+ $('#add_woosea_basic').on('change', function(){ // on change of state
313
+ if(this.checked){
314
+
315
+ // Checkbox is on
316
+ jQuery.ajax({
317
+ method: "POST",
318
+ url: ajaxurl,
319
+ data: { 'action': 'woosea_add_woosea_basic', 'status': "on" }
320
+ })
321
+ } else {
322
+ // Checkbox is off
323
+ jQuery.ajax({
324
+ method: "POST",
325
+ url: ajaxurl,
326
+ data: { 'action': 'woosea_add_woosea_basic', 'status': "off" }
327
+ })
328
+ }
329
+ })
330
+
331
  // Check if user would like to enable addition of CDATA
332
  $('#add_woosea_cdata').on('change', function(){ // on change of state
333
  if(this.checked){
pages/admin/woosea-manage-settings.php CHANGED
@@ -344,6 +344,24 @@ if(isset($_GET["tab"])) {
344
  </label>
345
  </td>
346
  </tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
347
  <tr>
348
  <td>
349
  <span><?php _e( 'Enable logging', 'woo-product-feed-pro');?></span>
344
  </label>
345
  </td>
346
  </tr>
347
+ <tr>
348
+ <td>
349
+ <span><?php _e( 'Show only basis attributes in field mapping and filter/rule drop-downs', 'woo-product-feed-pro');?></span>
350
+ </td>
351
+ <td>
352
+ <label class="woo-product-feed-pro-switch">
353
+ <?php
354
+ $add_woosea_basic = get_option ('add_woosea_basic');
355
+ if($add_woosea_basic == "yes"){
356
+ print "<input type=\"checkbox\" id=\"add_woosea_basic\" name=\"add_woosea_basic\" class=\"checkbox-field\" checked>";
357
+ } else {
358
+ print "<input type=\"checkbox\" id=\"add_woosea_basic\" name=\"add_woosea_basic\" class=\"checkbox-field\">";
359
+ }
360
+ ?>
361
+ <div class="woo-product-feed-pro-slider round"></div>
362
+ </label>
363
+ </td>
364
+ </tr>
365
  <tr>
366
  <td>
367
  <span><?php _e( 'Enable logging', 'woo-product-feed-pro');?></span>
readme.txt CHANGED
@@ -5,7 +5,7 @@ License URI: http://www.gnu.org/licenses/gpl.html
5
  Tags: Google Shopping Feed, Facebook feed, Facebook catalog feed, WooCommerce Product Feed, Product Feed, Bing Shopping Feed, Bing Product Feed, Google Merchant Feed, Skroutz, Google Product Feed, Pinterest, Idealo, Pixels, Conversion API
6
  Requires at least: 4.5
7
  Tested up to: 6.0
8
- Stable tag: 11.8.3
9
 
10
  == Description ==
11
 
@@ -345,6 +345,9 @@ Questions left or unanswered? Please do not hesitate to contact us at support@ad
345
 
346
  === Changelog ===
347
 
 
 
 
348
  = 11.8.3 (2022-08-15) =
349
  * Fixed an issue where not all (externally created) attributes or metafields where showing in the field mapping drop-downs
350
 
@@ -3782,6 +3785,9 @@ Questions left or unanswered? Please do not hesitate to contact us at support@ad
3782
 
3783
  == Upgrade Notice ==
3784
 
 
 
 
3785
  = 11.8.3 =
3786
  Fixed an issue where not all (externally created) attributes or metafields where showing in the field mapping drop-downs
3787
 
5
  Tags: Google Shopping Feed, Facebook feed, Facebook catalog feed, WooCommerce Product Feed, Product Feed, Bing Shopping Feed, Bing Product Feed, Google Merchant Feed, Skroutz, Google Product Feed, Pinterest, Idealo, Pixels, Conversion API
6
  Requires at least: 4.5
7
  Tested up to: 6.0
8
+ Stable tag: 11.8.4
9
 
10
  == Description ==
11
 
345
 
346
  === Changelog ===
347
 
348
+ = 11.8.4 (2022-08-17) =
349
+ * Added an option to enable/disable returning of only basic attributes in the field mapping and rules and filters drop-downs
350
+
351
  = 11.8.3 (2022-08-15) =
352
  * Fixed an issue where not all (externally created) attributes or metafields where showing in the field mapping drop-downs
353
 
3785
 
3786
  == Upgrade Notice ==
3787
 
3788
+ = 11.8.4 =
3789
+ Added an option to enable/disable returning of only basic attributes in the field mapping and rules and filters drop-downs
3790
+
3791
  = 11.8.3 =
3792
  Fixed an issue where not all (externally created) attributes or metafields where showing in the field mapping drop-downs
3793
 
trunk/classes/class-attributes.php CHANGED
@@ -82,9 +82,14 @@ private function get_custom_attributes() {
82
  if ( ! function_exists( 'woosea_get_meta_keys_for_post_type' ) ) :
83
 
84
  function woosea_get_meta_keys_for_post_type( $post_type, $sample_size = 'modified' ) {
85
- $meta_keys = array();
86
- //$posts = get_posts( array( 'post_type' => $post_type, 'limit' => $sample_size ) );
87
- $posts = get_posts( array( 'post_type' => $post_type, 'numberposts' => -1 ) );
 
 
 
 
 
88
 
89
  foreach ( $posts as $post ) {
90
  $post_meta_keys = get_post_custom_keys( $post->ID );
82
  if ( ! function_exists( 'woosea_get_meta_keys_for_post_type' ) ) :
83
 
84
  function woosea_get_meta_keys_for_post_type( $post_type, $sample_size = 'modified' ) {
85
+ $meta_keys = array();
86
+
87
+ $add_woosea_basic = get_option ('add_woosea_basic');
88
+ if($add_woosea_basic == "yes"){
89
+ $posts = get_posts( array( 'post_type' => $post_type, 'limit' => $sample_size ) );
90
+ } else {
91
+ $posts = get_posts( array( 'post_type' => $post_type, 'numberposts' => -1 ) );
92
+ }
93
 
94
  foreach ( $posts as $post ) {
95
  $post_meta_keys = get_post_custom_keys( $post->ID );
trunk/js/woosea_key.js CHANGED
@@ -26,7 +26,7 @@ jQuery(document).ready(function($) {
26
  var license_key = $('#license-key').val();
27
 
28
  jQuery.ajax({
29
- url: 'https://www.adtribes.io/check/license.php?key=' + license_key + '&email=' + license_email + '&domain=' + root_domain + '&version=11.8.3',
30
  jsonp: 'callback',
31
  dataType: 'jsonp',
32
  type: 'GET',
26
  var license_key = $('#license-key').val();
27
 
28
  jQuery.ajax({
29
+ url: 'https://www.adtribes.io/check/license.php?key=' + license_key + '&email=' + license_email + '&domain=' + root_domain + '&version=11.8.5',
30
  jsonp: 'callback',
31
  dataType: 'jsonp',
32
  type: 'GET',
trunk/js/woosea_manage.js CHANGED
@@ -308,6 +308,26 @@ jQuery(function($) {
308
  }
309
  })
310
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
311
  // Check if user would like to enable addition of CDATA
312
  $('#add_woosea_cdata').on('change', function(){ // on change of state
313
  if(this.checked){
308
  }
309
  })
310
 
311
+ // Check if user would like to enable only basis attributes in drop-downs
312
+ $('#add_woosea_basic').on('change', function(){ // on change of state
313
+ if(this.checked){
314
+
315
+ // Checkbox is on
316
+ jQuery.ajax({
317
+ method: "POST",
318
+ url: ajaxurl,
319
+ data: { 'action': 'woosea_add_woosea_basic', 'status': "on" }
320
+ })
321
+ } else {
322
+ // Checkbox is off
323
+ jQuery.ajax({
324
+ method: "POST",
325
+ url: ajaxurl,
326
+ data: { 'action': 'woosea_add_woosea_basic', 'status': "off" }
327
+ })
328
+ }
329
+ })
330
+
331
  // Check if user would like to enable addition of CDATA
332
  $('#add_woosea_cdata').on('change', function(){ // on change of state
333
  if(this.checked){
trunk/pages/admin/woosea-manage-settings.php CHANGED
@@ -344,6 +344,24 @@ if(isset($_GET["tab"])) {
344
  </label>
345
  </td>
346
  </tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
347
  <tr>
348
  <td>
349
  <span><?php _e( 'Enable logging', 'woo-product-feed-pro');?></span>
344
  </label>
345
  </td>
346
  </tr>
347
+ <tr>
348
+ <td>
349
+ <span><?php _e( 'Show only basis attributes in field mapping and filter/rule drop-downs', 'woo-product-feed-pro');?></span>
350
+ </td>
351
+ <td>
352
+ <label class="woo-product-feed-pro-switch">
353
+ <?php
354
+ $add_woosea_basic = get_option ('add_woosea_basic');
355
+ if($add_woosea_basic == "yes"){
356
+ print "<input type=\"checkbox\" id=\"add_woosea_basic\" name=\"add_woosea_basic\" class=\"checkbox-field\" checked>";
357
+ } else {
358
+ print "<input type=\"checkbox\" id=\"add_woosea_basic\" name=\"add_woosea_basic\" class=\"checkbox-field\">";
359
+ }
360
+ ?>
361
+ <div class="woo-product-feed-pro-slider round"></div>
362
+ </label>
363
+ </td>
364
+ </tr>
365
  <tr>
366
  <td>
367
  <span><?php _e( 'Enable logging', 'woo-product-feed-pro');?></span>
trunk/readme.txt CHANGED
@@ -5,7 +5,7 @@ License URI: http://www.gnu.org/licenses/gpl.html
5
  Tags: Google Shopping Feed, Facebook feed, Facebook catalog feed, WooCommerce Product Feed, Product Feed, Bing Shopping Feed, Bing Product Feed, Google Merchant Feed, Skroutz, Google Product Feed, Pinterest, Idealo, Pixels, Conversion API
6
  Requires at least: 4.5
7
  Tested up to: 6.0
8
- Stable tag: 11.8.3
9
 
10
  == Description ==
11
 
@@ -345,6 +345,12 @@ Questions left or unanswered? Please do not hesitate to contact us at support@ad
345
 
346
  === Changelog ===
347
 
 
 
 
 
 
 
348
  = 11.8.3 (2022-08-15) =
349
  * Fixed an issue where not all (externally created) attributes or metafields where showing in the field mapping drop-downs
350
 
@@ -3782,6 +3788,12 @@ Questions left or unanswered? Please do not hesitate to contact us at support@ad
3782
 
3783
  == Upgrade Notice ==
3784
 
 
 
 
 
 
 
3785
  = 11.8.3 =
3786
  Fixed an issue where not all (externally created) attributes or metafields where showing in the field mapping drop-downs
3787
 
5
  Tags: Google Shopping Feed, Facebook feed, Facebook catalog feed, WooCommerce Product Feed, Product Feed, Bing Shopping Feed, Bing Product Feed, Google Merchant Feed, Skroutz, Google Product Feed, Pinterest, Idealo, Pixels, Conversion API
6
  Requires at least: 4.5
7
  Tested up to: 6.0
8
+ Stable tag: 11.8.5
9
 
10
  == Description ==
11
 
345
 
346
  === Changelog ===
347
 
348
+ = 11.8.5 (2022-09-02) =
349
+ * Changed the update_option for cron_projects to non autoload
350
+
351
+ = 11.8.4 (2022-08-17) =
352
+ * Added an option to enable/disable returning of only basic attributes in the field mapping and rules and filters drop-downs
353
+
354
  = 11.8.3 (2022-08-15) =
355
  * Fixed an issue where not all (externally created) attributes or metafields where showing in the field mapping drop-downs
356
 
3788
 
3789
  == Upgrade Notice ==
3790
 
3791
+ = 11.8.5 =
3792
+ Changed the update_option for cron_projects to non autoload
3793
+
3794
+ = 11.8.4 =
3795
+ Added an option to enable/disable returning of only basic attributes in the field mapping and rules and filters drop-downs
3796
+
3797
  = 11.8.3 =
3798
  Fixed an issue where not all (externally created) attributes or metafields where showing in the field mapping drop-downs
3799
 
trunk/woocommerce-sea.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /**
3
  * Plugin Name: Product Feed PRO for WooCommerce
4
- * Version: 11.8.3
5
  * Plugin URI: https://www.adtribes.io/support/?utm_source=wpadmin&utm_medium=plugin&utm_campaign=woosea_product_feed_pro
6
  * Description: Configure and maintain your WooCommerce product feeds for Google Shopping, Catalog managers, Remarketing, Bing, Skroutz, Yandex, Comparison shopping websites and over a 100 channels more.
7
  * Author: AdTribes.io
@@ -48,7 +48,7 @@ if (!defined('ABSPATH')) {
48
  * Plugin versionnumber, please do not override.
49
  * Define some constants
50
  */
51
- define( 'WOOCOMMERCESEA_PLUGIN_VERSION', '11.8.3' );
52
  define( 'WOOCOMMERCESEA_PLUGIN_NAME', 'woocommerce-product-feed-pro' );
53
  define( 'WOOCOMMERCESEA_PLUGIN_NAME_SHORT', 'woo-product-feed-pro' );
54
 
@@ -2033,7 +2033,7 @@ function woosea_project_delete(){
2033
  unset($feed_config[$found_key]);
2034
 
2035
  # Update cron
2036
- update_option('cron_projects', $feed_config);
2037
 
2038
  # Remove project file
2039
  @unlink($file);
@@ -2068,7 +2068,7 @@ function woosea_project_cancel(){
2068
  wp_schedule_single_event( time() + 60, 'woosea_update_project_stats', array($val['project_hash']) );
2069
  }
2070
  }
2071
- update_option( 'cron_projects', $feed_config);
2072
  }
2073
  add_action( 'wp_ajax_woosea_project_cancel', 'woosea_project_cancel' );
2074
 
@@ -2152,7 +2152,7 @@ function woosea_project_copy(){
2152
  $new_key = $max_key+1;
2153
  $add_project[$new_key] = $val;
2154
  array_push($feed_config, $add_project[$new_key]);
2155
- update_option( 'cron_projects', $feed_config);
2156
 
2157
  // Do not start processing, user wants to make changes to the copied project
2158
  $copy_status = "true";
@@ -2278,7 +2278,7 @@ function woosea_project_status() {
2278
  }
2279
 
2280
  // Update cron with new project status
2281
- update_option( 'cron_projects', $feed_config);
2282
  }
2283
  add_action( 'wp_ajax_woosea_project_status', 'woosea_project_status' );
2284
 
@@ -2491,8 +2491,7 @@ function woosea_remove_free_shipping (){
2491
  add_action( 'wp_ajax_woosea_remove_free_shipping', 'woosea_remove_free_shipping' );
2492
 
2493
  /**
2494
- * This function enables the setting to use
2495
- * logging
2496
  */
2497
  function woosea_add_woosea_logging (){
2498
  $user = wp_get_current_user();
@@ -2510,6 +2509,25 @@ function woosea_add_woosea_logging (){
2510
  }
2511
  add_action( 'wp_ajax_woosea_add_woosea_logging', 'woosea_add_woosea_logging' );
2512
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2513
  /**
2514
  * This function enables the setting to add CDATA to title and descriptions
2515
  */
@@ -4546,7 +4564,7 @@ function woosea_last_updated($project_hash){
4546
  }
4547
  }
4548
 
4549
- update_option( 'cron_projects', $feed_config);
4550
  return $last_updated;
4551
  }
4552
 
1
  <?php
2
  /**
3
  * Plugin Name: Product Feed PRO for WooCommerce
4
+ * Version: 11.8.5
5
  * Plugin URI: https://www.adtribes.io/support/?utm_source=wpadmin&utm_medium=plugin&utm_campaign=woosea_product_feed_pro
6
  * Description: Configure and maintain your WooCommerce product feeds for Google Shopping, Catalog managers, Remarketing, Bing, Skroutz, Yandex, Comparison shopping websites and over a 100 channels more.
7
  * Author: AdTribes.io
48
  * Plugin versionnumber, please do not override.
49
  * Define some constants
50
  */
51
+ define( 'WOOCOMMERCESEA_PLUGIN_VERSION', '11.8.5' );
52
  define( 'WOOCOMMERCESEA_PLUGIN_NAME', 'woocommerce-product-feed-pro' );
53
  define( 'WOOCOMMERCESEA_PLUGIN_NAME_SHORT', 'woo-product-feed-pro' );
54
 
2033
  unset($feed_config[$found_key]);
2034
 
2035
  # Update cron
2036
+ update_option('cron_projects', $feed_config, 'no');
2037
 
2038
  # Remove project file
2039
  @unlink($file);
2068
  wp_schedule_single_event( time() + 60, 'woosea_update_project_stats', array($val['project_hash']) );
2069
  }
2070
  }
2071
+ update_option( 'cron_projects', $feed_config, 'no');
2072
  }
2073
  add_action( 'wp_ajax_woosea_project_cancel', 'woosea_project_cancel' );
2074
 
2152
  $new_key = $max_key+1;
2153
  $add_project[$new_key] = $val;
2154
  array_push($feed_config, $add_project[$new_key]);
2155
+ update_option( 'cron_projects', $feed_config, 'no');
2156
 
2157
  // Do not start processing, user wants to make changes to the copied project
2158
  $copy_status = "true";
2278
  }
2279
 
2280
  // Update cron with new project status
2281
+ update_option( 'cron_projects', $feed_config, 'no');
2282
  }
2283
  add_action( 'wp_ajax_woosea_project_status', 'woosea_project_status' );
2284
 
2491
  add_action( 'wp_ajax_woosea_remove_free_shipping', 'woosea_remove_free_shipping' );
2492
 
2493
  /**
2494
+ * This function enables the setting to use logging
 
2495
  */
2496
  function woosea_add_woosea_logging (){
2497
  $user = wp_get_current_user();
2509
  }
2510
  add_action( 'wp_ajax_woosea_add_woosea_logging', 'woosea_add_woosea_logging' );
2511
 
2512
+ /**
2513
+ * This function enables the setting to use only the basic attributes in drop-downs
2514
+ */
2515
+ function woosea_add_woosea_basic (){
2516
+ $user = wp_get_current_user();
2517
+ $allowed_roles = array( 'administrator' );
2518
+
2519
+ if ( array_intersect( $allowed_roles, $user->roles ) ) {
2520
+ $status = sanitize_text_field($_POST['status']);
2521
+
2522
+ if ($status == "off"){
2523
+ update_option( 'add_woosea_basic', 'no', 'yes');
2524
+ } else {
2525
+ update_option( 'add_woosea_basic', 'yes', 'yes');
2526
+ }
2527
+ }
2528
+ }
2529
+ add_action( 'wp_ajax_woosea_add_woosea_basic', 'woosea_add_woosea_basic' );
2530
+
2531
  /**
2532
  * This function enables the setting to add CDATA to title and descriptions
2533
  */
4564
  }
4565
  }
4566
 
4567
+ update_option( 'cron_projects', $feed_config, 'no');
4568
  return $last_updated;
4569
  }
4570
 
woocommerce-sea.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /**
3
  * Plugin Name: Product Feed PRO for WooCommerce
4
- * Version: 11.8.3
5
  * Plugin URI: https://www.adtribes.io/support/?utm_source=wpadmin&utm_medium=plugin&utm_campaign=woosea_product_feed_pro
6
  * Description: Configure and maintain your WooCommerce product feeds for Google Shopping, Catalog managers, Remarketing, Bing, Skroutz, Yandex, Comparison shopping websites and over a 100 channels more.
7
  * Author: AdTribes.io
@@ -48,7 +48,7 @@ if (!defined('ABSPATH')) {
48
  * Plugin versionnumber, please do not override.
49
  * Define some constants
50
  */
51
- define( 'WOOCOMMERCESEA_PLUGIN_VERSION', '11.8.3' );
52
  define( 'WOOCOMMERCESEA_PLUGIN_NAME', 'woocommerce-product-feed-pro' );
53
  define( 'WOOCOMMERCESEA_PLUGIN_NAME_SHORT', 'woo-product-feed-pro' );
54
 
@@ -2491,8 +2491,7 @@ function woosea_remove_free_shipping (){
2491
  add_action( 'wp_ajax_woosea_remove_free_shipping', 'woosea_remove_free_shipping' );
2492
 
2493
  /**
2494
- * This function enables the setting to use
2495
- * logging
2496
  */
2497
  function woosea_add_woosea_logging (){
2498
  $user = wp_get_current_user();
@@ -2510,6 +2509,25 @@ function woosea_add_woosea_logging (){
2510
  }
2511
  add_action( 'wp_ajax_woosea_add_woosea_logging', 'woosea_add_woosea_logging' );
2512
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2513
  /**
2514
  * This function enables the setting to add CDATA to title and descriptions
2515
  */
1
  <?php
2
  /**
3
  * Plugin Name: Product Feed PRO for WooCommerce
4
+ * Version: 11.8.4
5
  * Plugin URI: https://www.adtribes.io/support/?utm_source=wpadmin&utm_medium=plugin&utm_campaign=woosea_product_feed_pro
6
  * Description: Configure and maintain your WooCommerce product feeds for Google Shopping, Catalog managers, Remarketing, Bing, Skroutz, Yandex, Comparison shopping websites and over a 100 channels more.
7
  * Author: AdTribes.io
48
  * Plugin versionnumber, please do not override.
49
  * Define some constants
50
  */
51
+ define( 'WOOCOMMERCESEA_PLUGIN_VERSION', '11.8.4' );
52
  define( 'WOOCOMMERCESEA_PLUGIN_NAME', 'woocommerce-product-feed-pro' );
53
  define( 'WOOCOMMERCESEA_PLUGIN_NAME_SHORT', 'woo-product-feed-pro' );
54
 
2491
  add_action( 'wp_ajax_woosea_remove_free_shipping', 'woosea_remove_free_shipping' );
2492
 
2493
  /**
2494
+ * This function enables the setting to use logging
 
2495
  */
2496
  function woosea_add_woosea_logging (){
2497
  $user = wp_get_current_user();
2509
  }
2510
  add_action( 'wp_ajax_woosea_add_woosea_logging', 'woosea_add_woosea_logging' );
2511
 
2512
+ /**
2513
+ * This function enables the setting to use only the basic attributes in drop-downs
2514
+ */
2515
+ function woosea_add_woosea_basic (){
2516
+ $user = wp_get_current_user();
2517
+ $allowed_roles = array( 'administrator' );
2518
+
2519
+ if ( array_intersect( $allowed_roles, $user->roles ) ) {
2520
+ $status = sanitize_text_field($_POST['status']);
2521
+
2522
+ if ($status == "off"){
2523
+ update_option( 'add_woosea_basic', 'no', 'yes');
2524
+ } else {
2525
+ update_option( 'add_woosea_basic', 'yes', 'yes');
2526
+ }
2527
+ }
2528
+ }
2529
+ add_action( 'wp_ajax_woosea_add_woosea_basic', 'woosea_add_woosea_basic' );
2530
+
2531
  /**
2532
  * This function enables the setting to add CDATA to title and descriptions
2533
  */