Plugin Directory

Changeset 3475388


Ignore:
Timestamp:
03/05/2026 09:42:11 AM (3 days ago)
Author:
smackcoders
Message:

Version 2.23.1 - WC Order HPOS Compatibility

Location:
wp-ultimate-exporter
Files:
32 added
4 edited

Legend:

Unmodified
Added
Removed
  • wp-ultimate-exporter/trunk/Readme.txt

    r3463437 r3475388  
    66Tested up to: 6.9
    77Requires PHP: 7.4
    8 Stable tag: 2.23
    9 Version: 2.23
     8Stable tag: 2.23.1
     9Version: 2.23.1
    1010Author URI: https://www.smackcoders.com/wp-ultimate-csv-importer-pro.html
    1111License: GPLv2 or later
     
    2121**Important Note:** WP Ultimate Exporter is an add-on that requires the **[WP Ultimate CSV Importer](https://wordpress.org/plugins/wp-ultimate-csv-importer/)** to function.
    2222With this plugin, you can export all your WordPress content—including posts, pages, custom fields, users, and WooCommerce data—ensuring secure backups and effortless migrations.
    23 
    24 = What’s New in WP Ultimate Exporter 2.23 =
    25 
    26 Version 2.23 introduces SureCart export support in WP Ultimate Exporter. SureCart users can now export Products, Coupons, and Customers directly to CSV, XML, Excel, or other supported files from within WordPress. This makes it easier for store owners or managers to move data between sites, maintain backups, or work with bulk edits whenever needed.
    2723
    2824**Top Features & Benefits**
     
    421417== Changelog ==
    422418
     419= 2.23.1 =
     420* Added: Compatibility with WooCommerce High-Performance Order Storage (HPOS) to ensure the plugin works correctly when HPOS is enabled.
     421
    423422= 2.23 =
    424423* Added: SureCart export support for Products, Coupons, and Customers.
     
    887886== Upgrade Notice ==
    888887
    889 = 2.23 =
    890 
    891 This update adds SureCart export support. You can now export SureCart Products, Coupons, and Customers using CSV, Excel, or XML files directly from WordPress.
    892 
    893 
    894 
    895 
    896 
    897 
    898 
    899 
    900 
     888= 2.23.1 =
     889
     890Upgrade to version 2.23.1 to ensure compatibility with WooCommerce High-Performance Order Storage (HPOS).
     891
     892
     893
     894
     895
     896
  • wp-ultimate-exporter/trunk/exportExtensions/ExportExtension.php

    r3463437 r3475388  
    408408
    409409            } elseif ($module == 'shop_order') {
    410                 if (is_plugin_active('polylang/polylang.php') || is_plugin_active('polylang-pro/polylang.php') || is_plugin_active('polylang-wc/polylang-wc.php')) {
    411                     $order_statuses = array('wc-completed', 'wc-cancelled', 'wc-on-hold', 'wc-processing', 'wc-pending');
    412                     $orders_id = wc_get_orders(array('status' => $order_statuses, 'limit' => -1));
    413                     $get_post_ids = array();
    414                     foreach ($orders_id as $my_orders) {
    415                         $get_post_ids[] = $my_orders->get_id();
    416                     }
    417                     foreach ($get_post_ids as $ids) {
    418                         $module = $wpdb->get_var("SELECT post_type FROM {$wpdb->prefix}posts where id=$ids");
    419                     }
    420                     if ($module == 'shop_order_placehold') {
    421                         $orders = "select DISTINCT p.ID from {$wpdb->prefix}posts as p inner join {$wpdb->prefix}wc_orders as wc ON p.ID=wc.id";
    422                         $orders .= " where p.post_type = '$module'";
    423                         $orders .= "and wc.status in ('wc-completed', 'wc-cancelled', 'wc-on-hold', 'wc-processing', 'wc-pending')";
    424                         $orders = $wpdb->get_col($orders);
    425                     } else {
    426                         $orders = "select DISTINCT ID from {$wpdb->prefix}posts";
    427                         $orders .= " where post_type = '$module'";
    428                         $orders .= "and post_status in ('wc-completed','wc-cancelled','wc-on-hold','wc-processing','wc-pending')";
    429                         $orders = $wpdb->get_col($orders);
    430                     }
    431 
    432                 } else {
    433                     $order_statuses = array('wc-completed', 'wc-cancelled', 'wc-on-hold', 'wc-processing', 'wc-pending');
    434                     $orders = wc_get_orders(array('status' => $order_statuses, 'limit' => -1));
    435                 }
    436                 $total = count($orders);
    437                 return $total;
     410                $order_statuses = array('wc-completed','wc-cancelled','wc-on-hold','wc-processing','wc-pending','wc-refunded','wc-failed','wc-checkout-draft');
     411                $args = [
     412                        'return'  => 'ids',
     413                        'limit'  => -1,
     414                        'status'  => $order_statuses
     415                    ];
     416                $orders = wc_get_orders($args);
     417                $response = count($orders);
     418                update_option('woocommerce_order_count', $response);
     419                echo wp_json_encode($response);
     420                wp_die();
    438421
    439422            } elseif ($module == 'product_variation') {
  • wp-ultimate-exporter/trunk/exportExtensions/PostExport.php

    r3463437 r3475388  
    376376            }
    377377        } elseif ($module == 'shop_order' && is_plugin_active('woocommerce/woocommerce.php')) {
     378
     379            if (!empty($conditions['specific_period']['is_check'])) {
     380                $args = [
     381                    'return'  => 'ids',
     382                    'limit'   => $limit,
     383                    'offset'  => $offset,
     384                    'orderby' => 'date',
     385                    'order'   => 'DESC',
     386                ];
     387
     388                if (!empty($conditions['specific_period']['is_check']) &&!empty($conditions['specific_period']['from']) &&!empty($conditions['specific_period']['to'])) {
     389                    $args['date_query'] = [[
     390                        'after'     => $conditions['specific_period']['from'],
     391                        'before'    => $conditions['specific_period']['to'],
     392                        'inclusive' => true,
     393                    ]];
     394                }
     395
     396                $order_ids = wc_get_orders($args);
     397                $count_args = $args;
     398                $count_args['limit']  = -1;
     399                $count_args['offset'] = 0;
     400
     401                self::$export_instance->totalRowCount = count(wc_get_orders($count_args));
     402
     403                return $order_ids;
     404            }
    378405            if ($sitepress == null && !is_plugin_active('polylang/polylang.php') && !is_plugin_active('polylang-pro/polylang.php') && !is_plugin_active('polylang-wc/polylang-wc.php') && !is_plugin_active('woocommerce-multilingual/wpml-woocommerce.php')) {
    379406                if (!empty($conditions['specific_period']['is_check']) && $conditions['specific_period']['is_check'] == 'true') { //Specific period ONLY TRUE
  • wp-ultimate-exporter/trunk/wp-ultimate-exporter.php

    r3463437 r3475388  
    1111 * @wordpress-plugin
    1212 * Plugin Name: WP Ultimate Exporter
    13  * Version:     2.23
     13 * Version:     2.23.1
    1414 * Plugin URI:  https://www.smackcoders.com/ultimate-exporter.html
    1515 * Description: Backup tool to export all your WordPress data as CSV file. eCommerce data of WooCommerce, eCommerce, Custom Post and Custom field information along with default WordPress modules.
     
    4040
    4141define('IMPORTER_VERSION', '7.39');
    42 define('EXPORTER_VERSION', '2.23');
     42define('EXPORTER_VERSION', '2.23.1');
    4343require_once('Plugin.php');
    4444require_once('SmackExporterInstall.php');
Note: See TracChangeset for help on using the changeset viewer.