CTX Feed – WooCommerce Product Feed Manager Plugin - Version 2.2.18

Version Description

Download this release

Release Info

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

Code changes from version 2.2.17 to 2.2.18

README.txt CHANGED
@@ -1,10 +1,10 @@
1
- === WooCommerce Product Feed : Google Shopping,Facebook Product Ad,eBay and Many More ===
2
  Contributors: wahid0003
3
  Donate link: https://webappick.com
4
- Tags:woocommerce,Google Merchant Feed,Facebook product feed,eBay,Bing,pricegrabber,nextag,pricerunner,kelkoo,feed,woocommerce feed,woocommerce product feed, txt export, csv export, xml export,woocommerce export,product export, newegg,rakuten,houzz,godatafeed,pricefalls,google merchant,google shopping,sell,sears,variation export,shareasale,etsy,Buy,Getprice,LeGuide,Twenga,Beslist,Kieskeurig,HotLine,Yandex.Market,product variation,connexity,Commission Junction,channel advisor,dealtime,shopbot,shopzilla,yahoo,Getprice,Gimme,Junglee,Myshopping,Priceme,Shopmania,Wine-searcher
5
  Requires at least: 3.6
6
  Tested up to: 4.9
7
- Stable tag: 2.2.16
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -296,6 +296,9 @@ Using pro version:
296
 
297
  == Changelog ==
298
 
 
 
 
299
  = 2.2.17(2018-07-05) =
300
  * All field added to amazon template
301
 
1
+ === WooCommerce Product Feed for Google, Facebook, 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: 4.9
7
+ Stable tag: 2.2.18
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
296
 
297
  == Changelog ==
298
 
299
+ = 2.2.18(2018-07-09) =
300
+ * Google Product category missing warning added for Google Merchant and Facebook template
301
+
302
  = 2.2.17(2018-07-05) =
303
  * All field added to amazon template
304
 
admin/partials/woo-feed-manage-list.php CHANGED
@@ -61,6 +61,9 @@ if(isset($_POST)&& isset($_POST['filename'])){
61
 
62
  if (isset($_GET['link']) && !empty($_GET['link'])) {
63
  $message="<b style='color: #008779;'>Feed Generated Successfully. Feed URL: <a href=".$_GET['link']." target='_blank'>".$_GET['link']."</a></b>";
 
 
 
64
  echo "<div class='updated'><p>" . __($message, 'woo-feed') . "</p></div>";
65
  } elseif (isset($_GET['wpf_message']) && $_GET['wpf_message'] === 'error') {
66
  $dir=get_option("WPF_DIRECTORY_PERMISSION_CHECK");
@@ -350,7 +353,8 @@ if(isset($_POST)&& isset($_POST['filename'])){
350
  $('.wf_regenerate').text('Regenerate');
351
  $('.wf_regenerate').prop('disabled', false);
352
  var url=response.data.url;
353
- window.location.href = "<?php echo admin_url('admin.php?page=woo_feed_manage_feed&link='); ?>"+url;
 
354
  }else{
355
  showFeedProgress("red");
356
  $(".feed-progress-container2").text(response.data.message);
61
 
62
  if (isset($_GET['link']) && !empty($_GET['link'])) {
63
  $message="<b style='color: #008779;'>Feed Generated Successfully. Feed URL: <a href=".$_GET['link']." target='_blank'>".$_GET['link']."</a></b>";
64
+ if (isset($_GET['cat']) && $_GET['cat']=='no') {
65
+ $message.="<br/><br/><b style='color: #f49242;'>Warning:</b><ul>Google Product category is not selected. Your AdWords CPC rate will be high. Add proper Google Product Category to each product & reduce CPC rate. <a target='_blank' href='https://webappick.helpscoutdocs.com/article/19-how-to-map-store-category-with-merchant-category'>Learn more...</a> </li></ul>";
66
+ }
67
  echo "<div class='updated'><p>" . __($message, 'woo-feed') . "</p></div>";
68
  } elseif (isset($_GET['wpf_message']) && $_GET['wpf_message'] === 'error') {
69
  $dir=get_option("WPF_DIRECTORY_PERMISSION_CHECK");
353
  $('.wf_regenerate').text('Regenerate');
354
  $('.wf_regenerate').prop('disabled', false);
355
  var url=response.data.url;
356
+ var cat=response.data.cat;
357
+ window.location.href = "<?php echo admin_url('admin.php?page=woo_feed_manage_feed&link='); ?>"+url+"&cat="+cat
358
  }else{
359
  showFeedProgress("red");
360
  $(".feed-progress-container2").text(response.data.message);
admin/partials/woo-feed-pro-vs-free.php CHANGED
@@ -178,12 +178,12 @@
178
  </tr>
179
  <tr>
180
  <td><b>WooCommerce Composite Products</b></td>
181
- <td style="text-align: center;"><b><span style="font-size: 25px;color: green;" class="dashicons dashicons-no"></span></b></td>
182
  <td style="text-align: center;"><b><span style="font-size: 25px;color: green;" class="dashicons dashicons-yes"></span></b></td>
183
  </tr>
184
  <tr>
185
  <td><b>WooCommerce Bundle Products</b></td>
186
- <td style="text-align: center;"><b><span style="font-size: 25px;color: green;" class="dashicons dashicons-no"></span></b></td>
187
  <td style="text-align: center;"><b><span style="font-size: 25px;color: green;" class="dashicons dashicons-yes"></span></b></td>
188
  </tr>
189
  <tr>
@@ -235,7 +235,7 @@
235
  <tr>
236
  <td></td>
237
  <td></td>
238
- <td style="text-align: center;"><a href="https://goo.gl/URWvp6" target="_blank"><button class="button button-primary">Buy Now</button></a></td>
239
  </tr>
240
  </tbody>
241
  </table>
178
  </tr>
179
  <tr>
180
  <td><b>WooCommerce Composite Products</b></td>
181
+ <td style="text-align: center;"><b><span style="font-size: 25px;color: red;" class="dashicons dashicons-no"></span></b></td>
182
  <td style="text-align: center;"><b><span style="font-size: 25px;color: green;" class="dashicons dashicons-yes"></span></b></td>
183
  </tr>
184
  <tr>
185
  <td><b>WooCommerce Bundle Products</b></td>
186
+ <td style="text-align: center;"><b><span style="font-size: 25px;color: red;" class="dashicons dashicons-no"></span></b></td>
187
  <td style="text-align: center;"><b><span style="font-size: 25px;color: green;" class="dashicons dashicons-yes"></span></b></td>
188
  </tr>
189
  <tr>
235
  <tr>
236
  <td></td>
237
  <td></td>
238
+ <td style="text-align: center;"><a href="http://bit.ly/2KIwvTt" target="_blank"><button class="button button-primary">Buy Now</button></a></td>
239
  </tr>
240
  </tbody>
241
  </table>
includes/class-woo-feed.php CHANGED
@@ -70,7 +70,7 @@ class Woo_Feed
70
  public function __construct()
71
  {
72
  $this->woo_feed = 'woo-feed';
73
- $this->version = '2.2.17';
74
 
75
  $this->load_dependencies();
76
  $this->set_locale();
70
  public function __construct()
71
  {
72
  $this->woo_feed = 'woo-feed';
73
+ $this->version = '2.2.18';
74
 
75
  $this->load_dependencies();
76
  $this->set_locale();
includes/classes/class-woo-feed-admin-message.php CHANGED
@@ -19,11 +19,11 @@ class Woo_Feed_Message
19
  <tbody>
20
  <tr>
21
  <td align="center"><b><a target="_blank" style="color:#ee264a;"
22
- href="https://goo.gl/URWvp6">GET PREMIUM</a></b></td>
23
  <td align="center"><b><a target="_blank" style="color:#0073aa;"
24
  href="http://webappick.helpscoutdocs.com/">DOCUMENTATION</a></b></td>
25
  <td align="center"><b><a style="color:#ee264a;" target="_blank"
26
- href="https://www.youtube.com/playlist?list=PLapCcXJAoEenI-35wc6YnnsAAgoYRxDr7">VIDEOS TUTORIALS</a></b>
27
  </td>
28
  <td align="center"><b><a target="_blank" style="color:#0DD41E;"
29
  href="https://webappick.com/support/">FREE SUPPORT & HELP ( support@webappick.com )</a></b></td>
19
  <tbody>
20
  <tr>
21
  <td align="center"><b><a target="_blank" style="color:#ee264a;"
22
+ href="http://bit.ly/2KIwvTt">GET PREMIUM</a></b></td>
23
  <td align="center"><b><a target="_blank" style="color:#0073aa;"
24
  href="http://webappick.helpscoutdocs.com/">DOCUMENTATION</a></b></td>
25
  <td align="center"><b><a style="color:#ee264a;" target="_blank"
26
+ href="http://bit.ly/2u6giNz">VIDEOS TUTORIALS</a></b>
27
  </td>
28
  <td align="center"><b><a target="_blank" style="color:#0DD41E;"
29
  href="https://webappick.com/support/">FREE SUPPORT & HELP ( support@webappick.com )</a></b></td>
woo-feed.php CHANGED
@@ -16,7 +16,7 @@
16
  * Plugin Name: WooCommerce Product Feed
17
  * Plugin URI: https://webappick.com/
18
  * Description: This plugin generate WooCommerce product feed for Shopping Engines like Google Shopping,Facebook Product Feed,eBay,Amazon,Idealo and many more..
19
- * Version: 2.2.17
20
  * Author: WebAppick
21
  * Author URI: https://webappick.com/
22
  * License: GPL v2
@@ -210,6 +210,7 @@ function woo_feed_add_update($info = "", $name = "")
210
  'status'=>1
211
  );
212
 
 
213
  if (!empty($name) && $name != "wf_feed_" . $fileName) {
214
  delete_option($name);
215
  }
@@ -504,7 +505,6 @@ function woo_feed_save_feed_file(){
504
  check_ajax_referer('wpf_feed_nonce');
505
  $feed=str_replace("wf_feed_", "",$_POST['feed']);
506
 
507
-
508
  $info=get_option($feed);
509
 
510
  if(!$info){
@@ -512,12 +512,10 @@ function woo_feed_save_feed_file(){
512
  $info=$getInfo['feedrules'];
513
  }
514
 
515
-
516
  $feedService = $info['provider'];
517
  $fileName = str_replace(" ", "",$info['filename']);
518
  $type = $info['feedType'];
519
 
520
-
521
  $feedHeader=woo_feed_get_batch_feed_info($feedService,$type,"wf_store_feed_header_info_".$fileName);
522
  $feedBody=woo_feed_get_batch_feed_info($feedService,$type,"wf_store_feed_body_info_".$fileName);
523
  $feedFooter=woo_feed_get_batch_feed_info($feedService,$type,"wf_store_feed_footer_info_".$fileName);
@@ -532,7 +530,6 @@ function woo_feed_save_feed_file(){
532
  }else{
533
  $string=$feedHeader.$feedBody.$feedFooter;
534
  }
535
-
536
 
537
  $upload_dir = wp_upload_dir();
538
  $base = $upload_dir['basedir'];
@@ -541,7 +538,6 @@ function woo_feed_save_feed_file(){
541
  # Check If any products founds
542
  if ($string && !empty($string)) {
543
  # Save File
544
-
545
  $file = $path . "/" . $fileName . "." . $type;
546
  $save = new Woo_Feed_Savefile();
547
  if ($type == "csv") {
@@ -619,9 +615,14 @@ function woo_feed_save_feed_file(){
619
 
620
  $getInfo = unserialize(get_option('wf_feed_' . $fileName));
621
  $url = $getInfo['url'];
 
 
 
 
622
  $data=array(
623
  "info"=>$feedInfo,
624
  "url"=>$url,
 
625
  "message"=>"Feed Making Complete",
626
  );
627
  wp_send_json_success($data);
@@ -633,7 +634,27 @@ function woo_feed_save_feed_file(){
633
  wp_die();
634
  }
635
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
636
 
 
 
 
 
 
 
637
 
638
  /**
639
  * Generate Feed
@@ -676,6 +697,7 @@ function woo_feed_manage_feed()
676
  $fname = sanitize_text_field($_GET['feed']);
677
  if (count($_POST) && isset($_POST['provider']) && isset($_POST['edit-feed'])) {
678
  // if (woo_feed_add_update($_POST, $_GET['feed'])) {
 
679
  // $process = woo_feed_add_update($_POST, $fname);
680
  // if ($process) {
681
  // $message = "<b>Feed Updated Successfully. Feed URL: <a style='font-weight: bold;color:green;' target='_blank' href=$process>$process</a></b>";
16
  * Plugin Name: WooCommerce Product Feed
17
  * Plugin URI: https://webappick.com/
18
  * Description: This plugin generate WooCommerce product feed for Shopping Engines like Google Shopping,Facebook Product Feed,eBay,Amazon,Idealo and many more..
19
+ * Version: 2.2.18
20
  * Author: WebAppick
21
  * Author URI: https://webappick.com/
22
  * License: GPL v2
210
  'status'=>1
211
  );
212
 
213
+
214
  if (!empty($name) && $name != "wf_feed_" . $fileName) {
215
  delete_option($name);
216
  }
505
  check_ajax_referer('wpf_feed_nonce');
506
  $feed=str_replace("wf_feed_", "",$_POST['feed']);
507
 
 
508
  $info=get_option($feed);
509
 
510
  if(!$info){
512
  $info=$getInfo['feedrules'];
513
  }
514
 
 
515
  $feedService = $info['provider'];
516
  $fileName = str_replace(" ", "",$info['filename']);
517
  $type = $info['feedType'];
518
 
 
519
  $feedHeader=woo_feed_get_batch_feed_info($feedService,$type,"wf_store_feed_header_info_".$fileName);
520
  $feedBody=woo_feed_get_batch_feed_info($feedService,$type,"wf_store_feed_body_info_".$fileName);
521
  $feedFooter=woo_feed_get_batch_feed_info($feedService,$type,"wf_store_feed_footer_info_".$fileName);
530
  }else{
531
  $string=$feedHeader.$feedBody.$feedFooter;
532
  }
 
533
 
534
  $upload_dir = wp_upload_dir();
535
  $base = $upload_dir['basedir'];
538
  # Check If any products founds
539
  if ($string && !empty($string)) {
540
  # Save File
 
541
  $file = $path . "/" . $fileName . "." . $type;
542
  $save = new Woo_Feed_Savefile();
543
  if ($type == "csv") {
615
 
616
  $getInfo = unserialize(get_option('wf_feed_' . $fileName));
617
  $url = $getInfo['url'];
618
+
619
+
620
+ $cat=woo_feed_check_google_category($feedInfo);
621
+
622
  $data=array(
623
  "info"=>$feedInfo,
624
  "url"=>$url,
625
+ "cat"=>$cat,
626
  "message"=>"Feed Making Complete",
627
  );
628
  wp_send_json_success($data);
634
  wp_die();
635
  }
636
 
637
+ function woo_feed_check_google_category($feedInfo){
638
+
639
+ # Check Google Product Category for Google & Facebook Template and show message
640
+ $checkCategory=$feedInfo['feedrules']['mattributes'];
641
+ $checkCategoryType=$feedInfo['feedrules']['type'];
642
+ $merchant=$feedInfo['feedrules']['provider'];
643
+ $cat="no";
644
+ if(in_array($merchant,array('google','facebook')) && in_array("current_category",$checkCategory)){
645
+ $catKey=array_search('current_category',$checkCategory);
646
+ if($checkCategoryType[$catKey]=="pattern"){
647
+ $checkCategoryValue=$feedInfo['feedrules']['default'];
648
+ }else{
649
+ $checkCategoryValue=$feedInfo['feedrules']['attributes'];
650
+ }
651
 
652
+ if(!empty($checkCategoryValue[$catKey])){
653
+ $cat="yes";
654
+ }
655
+ }
656
+ return $cat;
657
+ }
658
 
659
  /**
660
  * Generate Feed
697
  $fname = sanitize_text_field($_GET['feed']);
698
  if (count($_POST) && isset($_POST['provider']) && isset($_POST['edit-feed'])) {
699
  // if (woo_feed_add_update($_POST, $_GET['feed'])) {
700
+
701
  // $process = woo_feed_add_update($_POST, $fname);
702
  // if ($process) {
703
  // $message = "<b>Feed Updated Successfully. Feed URL: <a style='font-weight: bold;color:green;' target='_blank' href=$process>$process</a></b>";