WooCommerce – Store Exporter - Version 2.0.2

Version Description

  • Fixed: Filter Products by Category not working when Variations included (thanks Leah)
Download this release

Release Info

Developer visser
Plugin Icon 128x128 WooCommerce – Store Exporter
Version 2.0.2
Comparing to
See all releases

Code changes from version 2.0.1 to 2.0.2

Files changed (4) hide show
  1. exporter.php +1 -1
  2. includes/category.php +2 -1
  3. includes/product.php +29 -28
  4. readme.txt +5 -2
exporter.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: WooCommerce - Store Exporter
4
  Plugin URI: http://www.visser.com.au/woocommerce/plugins/exporter/
5
  Description: Export store details out of WooCommerce into simple formatted files (e.g. CSV, TSV, Excel formats including XLS and XLSX, XML, etc.)
6
- Version: 2.0.1
7
  Author: Visser Labs
8
  Author URI: http://www.visser.com.au/about/
9
  License: GPL2
3
  Plugin Name: WooCommerce - Store Exporter
4
  Plugin URI: http://www.visser.com.au/woocommerce/plugins/exporter/
5
  Description: Export store details out of WooCommerce into simple formatted files (e.g. CSV, TSV, Excel formats including XLS and XLSX, XML, etc.)
6
+ Version: 2.0.2
7
  Author: Visser Labs
8
  Author URI: http://www.visser.com.au/about/
9
  License: GPL2
includes/category.php CHANGED
@@ -7,10 +7,11 @@ if( is_admin() ) {
7
  function woo_ce_get_export_type_category_count() {
8
 
9
  $count = 0;
 
 
10
  // Check if the existing Transient exists
11
  $cached = get_transient( WOO_CE_PREFIX . '_category_count' );
12
  if( $cached == false ) {
13
- $term_taxonomy = 'product_cat';
14
  if( taxonomy_exists( $term_taxonomy ) )
15
  $count = wp_count_terms( $term_taxonomy );
16
  set_transient( WOO_CE_PREFIX . '_category_count', $count, HOUR_IN_SECONDS );
7
  function woo_ce_get_export_type_category_count() {
8
 
9
  $count = 0;
10
+ $term_taxonomy = 'product_cat';
11
+
12
  // Check if the existing Transient exists
13
  $cached = get_transient( WOO_CE_PREFIX . '_category_count' );
14
  if( $cached == false ) {
 
15
  if( taxonomy_exists( $term_taxonomy ) )
16
  $count = wp_count_terms( $term_taxonomy );
17
  set_transient( WOO_CE_PREFIX . '_category_count', $count, HOUR_IN_SECONDS );
includes/product.php CHANGED
@@ -514,37 +514,38 @@ function woo_ce_get_products( $args = array() ) {
514
  // Check if we are doing a Variation export
515
  if( !in_array( 'product_variation', $args['post_type'] ) ) {
516
 
517
- // Filter Products by Product Category
518
- if( $product_category ) {
519
- $term_taxonomy = 'product_cat';
520
- // Check if tax_query has been created
521
- if( !isset( $args['tax_query'] ) )
522
- $args['tax_query'] = array();
523
- $args['tax_query'][] = array(
524
- array(
525
- 'taxonomy' => $term_taxonomy,
526
- 'field' => 'id',
527
- 'terms' => $product_category
528
- )
529
- );
530
- }
531
 
532
- // Filter Products by Product Tag
533
- if( $product_tag ) {
534
- $term_taxonomy = 'product_tag';
535
- // Check if tax_query has been created
536
- if( !isset( $args['tax_query'] ) )
537
- $args['tax_query'] = array();
538
- $args['tax_query'][] = array(
539
- array(
540
- 'taxonomy' => $term_taxonomy,
541
- 'field' => 'id',
542
- 'terms' => $product_tag
543
- )
544
- );
545
- }
546
 
 
 
 
 
 
 
 
 
 
 
 
 
 
547
  }
 
548
  // Filter Products by Post Status
549
  if( $product_status ) {
550
  $args['post_status'] = woo_ce_post_statuses( $product_status, true );
514
  // Check if we are doing a Variation export
515
  if( !in_array( 'product_variation', $args['post_type'] ) ) {
516
 
517
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
518
 
519
+ // Filter Products by Product Category
520
+ if( $product_category ) {
521
+ $term_taxonomy = 'product_cat';
522
+ // Check if tax_query has been created
523
+ if( !isset( $args['tax_query'] ) )
524
+ $args['tax_query'] = array();
525
+ $args['tax_query'][] = array(
526
+ array(
527
+ 'taxonomy' => $term_taxonomy,
528
+ 'field' => 'id',
529
+ 'terms' => $product_category
530
+ )
531
+ );
532
+ }
533
 
534
+ // Filter Products by Product Tag
535
+ if( $product_tag ) {
536
+ $term_taxonomy = 'product_tag';
537
+ // Check if tax_query has been created
538
+ if( !isset( $args['tax_query'] ) )
539
+ $args['tax_query'] = array();
540
+ $args['tax_query'][] = array(
541
+ array(
542
+ 'taxonomy' => $term_taxonomy,
543
+ 'field' => 'id',
544
+ 'terms' => $product_tag
545
+ )
546
+ );
547
  }
548
+
549
  // Filter Products by Post Status
550
  if( $product_status ) {
551
  $args['post_status'] = woo_ce_post_statuses( $product_status, true );
readme.txt CHANGED
@@ -4,8 +4,8 @@ Contributors: visser, visser.labs
4
  Donate link: https://www.visser.com.au/donations/
5
  Tags: woocommerce, export, export products, export sales, export orders, export subscriptions, csv, xml, xls, xlsx, excel, export customers, export coupons, export users, export attributes
6
  Requires at least: 2.9.2
7
- Tested up to: 4.9.7
8
- Stable tag: 2.0.1
9
  License: GPLv2 or later
10
 
11
  Export store details out of WooCommerce into simple formatted files (e.g. CSV, XML, Excel 2007, XLS, etc.).
@@ -164,6 +164,9 @@ If you have any problems, questions or suggestions please create a topic here on
164
 
165
  == Changelog ==
166
 
 
 
 
167
  = 2.0.1 =
168
  * Fixed: Prefixing error on a error notice (thanks NicheLabs)
169
 
4
  Donate link: https://www.visser.com.au/donations/
5
  Tags: woocommerce, export, export products, export sales, export orders, export subscriptions, csv, xml, xls, xlsx, excel, export customers, export coupons, export users, export attributes
6
  Requires at least: 2.9.2
7
+ Tested up to: 4.9.8
8
+ Stable tag: 2.0.2
9
  License: GPLv2 or later
10
 
11
  Export store details out of WooCommerce into simple formatted files (e.g. CSV, XML, Excel 2007, XLS, etc.).
164
 
165
  == Changelog ==
166
 
167
+ = 2.0.2 =
168
+ * Fixed: Filter Products by Category not working when Variations included (thanks Leah)
169
+
170
  = 2.0.1 =
171
  * Fixed: Prefixing error on a error notice (thanks NicheLabs)
172