Changeset 3607033
- Timestamp:
- 07/14/2026 07:23:04 AM (3 months ago)
- Location:
- magic-export-import
- Files:
-
- 71 added
- 5 edited
-
tags/2.0.1 (added)
-
tags/2.0.1/.DS_Store (added)
-
tags/2.0.1/LICENSE (added)
-
tags/2.0.1/assets (added)
-
tags/2.0.1/assets/.DS_Store (added)
-
tags/2.0.1/assets/loader.svg (added)
-
tags/2.0.1/assets/magic-export-import.js (added)
-
tags/2.0.1/assets/magic-export-import.min.css (added)
-
tags/2.0.1/assets/magic-export-import.min.css.map (added)
-
tags/2.0.1/assets/magic-export-import.min.js (added)
-
tags/2.0.1/assets/magic-export-import.scss (added)
-
tags/2.0.1/assets/select2 (added)
-
tags/2.0.1/assets/select2/select2.min.css (added)
-
tags/2.0.1/assets/select2/select2.min.js (added)
-
tags/2.0.1/assets/vis (added)
-
tags/2.0.1/assets/vis/vis-network.min.css (added)
-
tags/2.0.1/assets/vis/vis-network.min.js (added)
-
tags/2.0.1/cache (added)
-
tags/2.0.1/cache/.DS_Store (added)
-
tags/2.0.1/cache/.htaccess (added)
-
tags/2.0.1/cache/index.php (added)
-
tags/2.0.1/class-magic-ex-im-setup.php (added)
-
tags/2.0.1/includes (added)
-
tags/2.0.1/includes/.DS_Store (added)
-
tags/2.0.1/includes/class-magic-ex-im-cache.php (added)
-
tags/2.0.1/includes/class-magic-ex-im-data.php (added)
-
tags/2.0.1/includes/class-magic-ex-im-type.php (added)
-
tags/2.0.1/includes/magic-ex-im-fallback-functions.php (added)
-
tags/2.0.1/includes/magic-ex-im-functions.php (added)
-
tags/2.0.1/includes/magic-types (added)
-
tags/2.0.1/includes/magic-types/class-magic-ex-im-type-acf-options-pages.php (added)
-
tags/2.0.1/includes/magic-types/class-magic-ex-im-type-comments.php (added)
-
tags/2.0.1/includes/magic-types/class-magic-ex-im-type-menus.php (added)
-
tags/2.0.1/includes/magic-types/class-magic-ex-im-type-posts.php (added)
-
tags/2.0.1/includes/magic-types/class-magic-ex-im-type-shop-orders.php (added)
-
tags/2.0.1/includes/magic-types/class-magic-ex-im-type-terms.php (added)
-
tags/2.0.1/includes/magic-types/class-magic-ex-im-type-users.php (added)
-
tags/2.0.1/includes/plugin-adapters (added)
-
tags/2.0.1/includes/plugin-adapters/.DS_Store (added)
-
tags/2.0.1/includes/plugin-adapters/class-magic-ex-im-adapter-acf.php (added)
-
tags/2.0.1/includes/plugin-adapters/class-magic-ex-im-adapter-cf7.php (added)
-
tags/2.0.1/includes/plugin-adapters/class-magic-ex-im-adapter-polylang.php (added)
-
tags/2.0.1/includes/plugin-adapters/class-magic-ex-im-adapter-wc-bexio-automator.php (added)
-
tags/2.0.1/includes/plugin-adapters/class-magic-ex-im-adapter-woocommerce.php (added)
-
tags/2.0.1/includes/plugin-adapters/class-magic-ex-im-adapter-yoast-seo.php (added)
-
tags/2.0.1/includes/trait-magic-ex-im-singleton.php (added)
-
tags/2.0.1/languages (added)
-
tags/2.0.1/languages/magic-export-import.pot (added)
-
tags/2.0.1/readme.txt (added)
-
tags/2.0.1/template-parts (added)
-
tags/2.0.1/template-parts/.DS_Store (added)
-
tags/2.0.1/template-parts/advanced-filters (added)
-
tags/2.0.1/template-parts/advanced-filters/advanced-filters-comments.php (added)
-
tags/2.0.1/template-parts/advanced-filters/advanced-filters-posts.php (added)
-
tags/2.0.1/template-parts/advanced-filters/advanced-filters-shop-orders.php (added)
-
tags/2.0.1/template-parts/advanced-filters/advanced-filters-terms-polylang.php (added)
-
tags/2.0.1/template-parts/advanced-filters/advanced-filters-terms.php (added)
-
tags/2.0.1/template-parts/advanced-filters/advanced-filters-toggler.php (added)
-
tags/2.0.1/template-parts/advanced-filters/advanced-filters-users.php (added)
-
tags/2.0.1/template-parts/export-progress.php (added)
-
tags/2.0.1/template-parts/import-progress.php (added)
-
tags/2.0.1/template-parts/page-content.php (added)
-
tags/2.0.1/template-parts/select-export-keys.php (added)
-
tags/2.0.1/template-parts/select-export-media-keys.php (added)
-
tags/2.0.1/template-parts/select-export-related-keys.php (added)
-
tags/2.0.1/template-parts/select.php (added)
-
trunk/assets/vis (added)
-
trunk/assets/vis/vis-network.min.css (added)
-
trunk/assets/vis/vis-network.min.js (added)
-
trunk/class-magic-ex-im-setup.php (modified) (1 diff)
-
trunk/includes/class-magic-ex-im-cache.php (added)
-
trunk/includes/class-magic-ex-im-type.php (modified) (7 diffs)
-
trunk/includes/magic-types/class-magic-ex-im-type-menus.php (added)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/template-parts/export-progress.php (modified) (1 diff)
-
trunk/template-parts/import-progress.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
magic-export-import/trunk/class-magic-ex-im-setup.php
r3599178 r3607033 3 3 * Plugin Name: Magic Export & Import 4 4 * Description: The ultimate tool to migrate any content including posts, terms, users, comments, WooCommerce shop orders, menus and ACF Options pages. 5 * Version: 2.0. 05 * Version: 2.0.1 6 6 * Requires at least: 6.2 7 7 * Requires PHP: 7.4 -
magic-export-import/trunk/includes/class-magic-ex-im-type.php
r3599178 r3607033 2558 2558 'finish' => false, 2559 2559 'total' => 0, 2560 'extra_total' => 0, 2560 2561 'processed' => 0, 2561 2562 'related_total' => 0, … … 2666 2667 } 2667 2668 2669 // Count items added automatically along with the selected ones (e.g. refunds of 2670 // refunded orders or variations of variable products), so the progress can 2671 // explain why the total exceeds the user's selection. 2672 $extra_items_cnt = count( $item_ids ) - count( $this->get_export_items( $posted_data, false ) ); 2673 2674 $this->export_progress['extra_total'] = max( 0, $extra_items_cnt ); 2675 2668 2676 // Additional data plan: groups with their prefixed keys and item IDs. 2669 2677 $related_plan = $this->get_export_related_plan( $posted_data ); … … 2681 2689 if ( $related_plan ) { 2682 2690 $params['related-manifest'] = $this->get_related_manifest_from_plan( $related_plan ); 2691 } 2692 2693 // Pass the automatically added items count to the import progress. 2694 if ( $this->export_progress['extra_total'] ) { 2695 $params['extra-items'] = $this->export_progress['extra_total']; 2683 2696 } 2684 2697 … … 3104 3117 'finish' => false, 3105 3118 'total' => 0, 3119 'extra_total' => 0, 3106 3120 'related_total' => 0, 3107 3121 'related_group' => 0, … … 3331 3345 $this->import_progress['user_params'] = $user_params; 3332 3346 $this->import_progress['file_params'] = $file_params; 3347 $this->import_progress['extra_total'] = intval( $file_params['extra-items'] ?? 0 ); 3333 3348 $this->import_progress['first_entry'] = false; 3334 3349 … … 3371 3386 3372 3387 // Determine if the last slice is being processed. 3373 $finish_cnt = $this->import_progress['processed'] + count( $next_slice ); 3374 $this->import_progress['file_items_processed'] = $this->import_progress['total'] <= $finish_cnt; 3388 $finish_cnt = $this->import_progress['processed'] + count( $next_slice ); 3375 3389 3376 3390 // Set import items data. … … 3384 3398 3385 3399 $this->import_items( $import_items_data ); 3400 3401 // Mark file items as processed only after importing the slice, so the last 3402 // slice still honors the 'skip-existing-items' user parameter. 3403 $this->import_progress['file_items_processed'] = $this->import_progress['total'] <= $finish_cnt; 3386 3404 3387 3405 // Process deferred items data. -
magic-export-import/trunk/readme.txt
r3599178 r3607033 6 6 Tested up to: 7.0 7 7 Requires PHP: 7.4 8 Stable tag: 2.0. 08 Stable tag: 2.0.1 9 9 License: GPL v3 or later 10 10 License URI: https://www.gnu.org/licenses/gpl-3.0.txt … … 85 85 == Changelog == 86 86 87 = 2.0.1 = 88 * Fix: the "Do not update existing items, only create new" import setting was not applied to the last slice of the file, so the trailing items (typically Refunds, which ride at the end of Shop Orders files) were updated instead of skipped. 89 * Improvement: when related items are exported automatically along with the selected ones (e.g. Refunds of refunded Orders or Variations of variable Products), the export and import progress now show how many such items are included, clarifying why the total exceeds the number of selected items. 90 87 91 = 2.0.0 = 88 92 * New: export and import related data types within one file. Check "Export related data types and referenced items" to include the data referenced by the exporting items (e.g. Products, Users and Coupons for Shop Orders; Terms and Users for Posts; linked Posts and Terms for Menus and Comments, including nested relations like Product Categories for ordered Products). The offered types follow the data selected for export and reset when that selection changes. On import, related items are processed first so all the references resolve: missing items are created, existing ones are kept untouched (adjustable with the separate related items import settings). -
magic-export-import/trunk/template-parts/export-progress.php
r3599178 r3607033 40 40 </p> 41 41 42 <?php if ( ! empty( $args['extra_total'] ) ) : ?> 43 <p class="description"> 44 <?php 45 printf( 46 /* translators: %s: number of automatically added related items wrapped in HTML. */ 47 esc_html__( 'The total exceeds your selection by %s items exported automatically along with the selected ones (e.g. Refunds of refunded Orders or Variations of variable Products).', 'magic-export-import' ), 48 '<b>' . intval( $args['extra_total'] ) . '</b>' 49 ); 50 ?> 51 </p> 52 <?php endif; ?> 53 42 54 <?php if ( ! $is_finished && ! $has_error ) : ?> 43 55 <button id="magic-ex-stop" class="button button-link-delete" style="margin-top: 10px;"><?php esc_html_e( 'Stop export', 'magic-export-import' ); ?></button> -
magic-export-import/trunk/template-parts/import-progress.php
r3599178 r3607033 49 49 </p> 50 50 51 <?php if ( ! empty( $args['extra_total'] ) ) : ?> 52 <p class="description"> 53 <?php 54 printf( 55 /* translators: %s: number of automatically added related items wrapped in HTML. */ 56 esc_html__( 'The file contains %s items exported automatically along with the selected ones (e.g. Refunds of refunded Orders or Variations of variable Products), included in the total.', 'magic-export-import' ), 57 '<b>' . intval( $args['extra_total'] ) . '</b>' 58 ); 59 ?> 60 </p> 61 <?php endif; ?> 62 51 63 <?php if ( magic_ex_im_get_user_params( 'download-media' ) ) : ?> 52 64 <p style="margin-top:1em;"><?php esc_html_e( 'Media downloaded:', 'magic-export-import' ); ?> <b><?php echo intval( $args['media_downloaded'] ); ?></b></p>
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)