Plugin Directory

Changeset 3451857


Ignore:
Timestamp:
02/02/2026 08:46:00 AM (8 weeks ago)
Author:
malakontask
Message:

v3.0.7 - SEO URL preservation and empty term name fix

Location:
transfer-brands-for-woocommerce
Files:
6 edited
1 copied

Legend:

Unmodified
Added
Removed
  • transfer-brands-for-woocommerce/tags/3.0.7/includes/class-transfer.php

    r3450749 r3451857  
    9797            $term = $terms[0];
    9898            $log_message = '';
    99            
    100             // Create or get new term
     99
     100            // Skip terms with empty names (data integrity issue in source)
     101            if (empty(trim($term->name))) {
     102                $this->core->add_debug("Skipping term with empty name", [
     103                    'term_id' => $term->term_id,
     104                    'slug' => $term->slug
     105                ]);
     106
     107                $offset++;
     108                $percent = min(45, round(($offset / $total) * 40) + 5);
     109
     110                return [
     111                    'success' => true,
     112                    'step' => 'terms',
     113                    'offset' => $offset,
     114                    'total' => $total,
     115                    'percent' => $percent,
     116                    'message' => "Transferring terms: {$offset} of {$total}",
     117                    'log' => 'Skipped term with empty name (ID: ' . $term->term_id . ')'
     118                ];
     119            }
     120
     121            // Create or get new term - PRESERVE ORIGINAL SLUG for SEO
    101122            $new = term_exists($term->name, $this->core->get_option('destination_taxonomy'));
    102123            if (!$new) {
    103124                $new = wp_insert_term($term->name, $this->core->get_option('destination_taxonomy'), [
    104                     'slug' => sanitize_title($term->name),
     125                    'slug' => $term->slug, // Preserve original slug for SEO/URL preservation
    105126                    'description' => $term->description
    106127                ]);
    107                 $log_message = 'Created new term: ' . $term->name;
     128                $log_message = 'Created new term: ' . $term->name . ' (slug: ' . $term->slug . ')';
    108129            } else {
    109130                $log_message = 'Using existing term: ' . $term->name;
  • transfer-brands-for-woocommerce/tags/3.0.7/readme.txt

    r3450749 r3451857  
    44Requires at least: 6.0
    55Tested up to: 6.9
    6 Stable tag: 3.0.6
     6Stable tag: 3.0.7
    77Requires PHP: 7.4
    88License: GPLv2 or later
     
    130130
    131131== Changelog ==
     132
     133= 3.0.7 =
     134* **Fixed**: Empty term name error - now skips brands with empty names instead of failing the transfer
     135* **Fixed**: SEO URL preservation - brand slugs are now preserved during transfer to maintain existing URLs
     136* **Improved**: Better logging shows preserved slugs during term creation
    132137
    133138= 3.0.6 =
     
    340345== Upgrade Notice ==
    341346
     347= 3.0.7 =
     348**SEO-critical fix**: Brand slugs are now preserved during transfer, maintaining your existing URLs and search rankings. Also fixes error when source brands have empty names. Recommended for all users migrating from Perfect Brands or other brand plugins.
     349
    342350= 3.0.6 =
    343351**Critical security and reliability update**: Fixes XSS vulnerabilities in error displays, removes dead code, adds proper backup verification before transfers, and fixes smart brand detection timing. Strongly recommended for all users.
  • transfer-brands-for-woocommerce/tags/3.0.7/transfer-brands-for-woocommerce.php

    r3450749 r3451857  
    44 * Plugin URI: https://pluginatlas.com/transfer-brands-for-woocommerce
    55 * Description: Official WooCommerce 9.6 brand migration tool. Transfer from Perfect Brands, YITH, or custom attributes with backup and image support.
    6  * Version: 3.0.6
     6 * Version: 3.0.7
    77 * Requires at least: 6.0
    88 * Requires PHP: 7.4
     
    3636
    3737// Define plugin constants
    38 define('TBFW_VERSION', '3.0.6');
     38define('TBFW_VERSION', '3.0.7');
    3939define('TBFW_PLUGIN_DIR', plugin_dir_path(__FILE__));
    4040define('TBFW_PLUGIN_URL', plugin_dir_url(__FILE__));
  • transfer-brands-for-woocommerce/trunk/includes/class-transfer.php

    r3450749 r3451857  
    9797            $term = $terms[0];
    9898            $log_message = '';
    99            
    100             // Create or get new term
     99
     100            // Skip terms with empty names (data integrity issue in source)
     101            if (empty(trim($term->name))) {
     102                $this->core->add_debug("Skipping term with empty name", [
     103                    'term_id' => $term->term_id,
     104                    'slug' => $term->slug
     105                ]);
     106
     107                $offset++;
     108                $percent = min(45, round(($offset / $total) * 40) + 5);
     109
     110                return [
     111                    'success' => true,
     112                    'step' => 'terms',
     113                    'offset' => $offset,
     114                    'total' => $total,
     115                    'percent' => $percent,
     116                    'message' => "Transferring terms: {$offset} of {$total}",
     117                    'log' => 'Skipped term with empty name (ID: ' . $term->term_id . ')'
     118                ];
     119            }
     120
     121            // Create or get new term - PRESERVE ORIGINAL SLUG for SEO
    101122            $new = term_exists($term->name, $this->core->get_option('destination_taxonomy'));
    102123            if (!$new) {
    103124                $new = wp_insert_term($term->name, $this->core->get_option('destination_taxonomy'), [
    104                     'slug' => sanitize_title($term->name),
     125                    'slug' => $term->slug, // Preserve original slug for SEO/URL preservation
    105126                    'description' => $term->description
    106127                ]);
    107                 $log_message = 'Created new term: ' . $term->name;
     128                $log_message = 'Created new term: ' . $term->name . ' (slug: ' . $term->slug . ')';
    108129            } else {
    109130                $log_message = 'Using existing term: ' . $term->name;
  • transfer-brands-for-woocommerce/trunk/readme.txt

    r3450749 r3451857  
    44Requires at least: 6.0
    55Tested up to: 6.9
    6 Stable tag: 3.0.6
     6Stable tag: 3.0.7
    77Requires PHP: 7.4
    88License: GPLv2 or later
     
    130130
    131131== Changelog ==
     132
     133= 3.0.7 =
     134* **Fixed**: Empty term name error - now skips brands with empty names instead of failing the transfer
     135* **Fixed**: SEO URL preservation - brand slugs are now preserved during transfer to maintain existing URLs
     136* **Improved**: Better logging shows preserved slugs during term creation
    132137
    133138= 3.0.6 =
     
    340345== Upgrade Notice ==
    341346
     347= 3.0.7 =
     348**SEO-critical fix**: Brand slugs are now preserved during transfer, maintaining your existing URLs and search rankings. Also fixes error when source brands have empty names. Recommended for all users migrating from Perfect Brands or other brand plugins.
     349
    342350= 3.0.6 =
    343351**Critical security and reliability update**: Fixes XSS vulnerabilities in error displays, removes dead code, adds proper backup verification before transfers, and fixes smart brand detection timing. Strongly recommended for all users.
  • transfer-brands-for-woocommerce/trunk/transfer-brands-for-woocommerce.php

    r3450749 r3451857  
    44 * Plugin URI: https://pluginatlas.com/transfer-brands-for-woocommerce
    55 * Description: Official WooCommerce 9.6 brand migration tool. Transfer from Perfect Brands, YITH, or custom attributes with backup and image support.
    6  * Version: 3.0.6
     6 * Version: 3.0.7
    77 * Requires at least: 6.0
    88 * Requires PHP: 7.4
     
    3636
    3737// Define plugin constants
    38 define('TBFW_VERSION', '3.0.6');
     38define('TBFW_VERSION', '3.0.7');
    3939define('TBFW_PLUGIN_DIR', plugin_dir_path(__FILE__));
    4040define('TBFW_PLUGIN_URL', plugin_dir_url(__FILE__));
Note: See TracChangeset for help on using the changeset viewer.