Changeset 3474209
- Timestamp:
- 03/04/2026 06:06:45 AM (6 days ago)
- Location:
- wholesalex-migration-tool
- Files:
-
- 2 deleted
- 6 edited
- 1 copied
-
tags/1.0.2 (copied) (copied from wholesalex-migration-tool/trunk)
-
tags/1.0.2/assets/js/whx_migration_tools.js (deleted)
-
tags/1.0.2/includes/class-wholesalex-migration-tool.php (modified) (10 diffs)
-
tags/1.0.2/readme.txt (modified) (2 diffs)
-
tags/1.0.2/wholesalex-migration-tool.php (modified) (2 diffs)
-
trunk/assets/js/whx_migration_tools.js (deleted)
-
trunk/includes/class-wholesalex-migration-tool.php (modified) (10 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/wholesalex-migration-tool.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wholesalex-migration-tool/tags/1.0.2/includes/class-wholesalex-migration-tool.php
r3134803 r3474209 7 7 class WholesaleXMigrationTool { 8 8 9 9 10 /** 10 11 * Instance of this class … … 19 20 * 20 21 * @return WholesaleXMigrationTool|null 21 * @since 1.0.022 * @since 1.0.0 22 23 */ 23 24 public static function run() { … … 35 36 /** 36 37 * Fires as an admin screen or script is being initialized. 37 *38 38 */ 39 add_action('admin_init',function() : void { 40 if(isset($_GET['reset_migration']) && $_GET['reset_migration']=='reset' ) { 41 wholesalex()->set_setting('wholesale_suite_migration_complete',false); 42 wholesalex()->set_setting('b2bking_migration_complete',false); 43 delete_transient('wholesalex_b2bking_migration_stats'); 44 delete_transient('wholesalex_wholesale_suite_migration_stats'); 45 die(); 39 add_action( 40 'admin_init', 41 function (): void { 42 if ( isset( $_GET['reset_migration'] ) && $_GET['reset_migration'] == 'reset' ) { 43 wholesalex()->set_setting( 'wholesale_suite_migration_complete', false ); 44 wholesalex()->set_setting( 'b2bking_migration_complete', false ); 45 delete_transient( 'wholesalex_b2bking_migration_stats' ); 46 delete_transient( 'wholesalex_wholesale_suite_migration_stats' ); 47 die(); 48 } 46 49 } 47 } ); 48 50 ); 49 51 } 50 52 … … 85 87 86 88 do_action( 'wholesalex_migration_tools_restapi_action', $post ); 87 88 89 } 89 90 … … 91 92 * Tools Sub Menu Page Callback 92 93 * 93 * @since 1.2.994 * @since 1.2.9 94 95 * @access public 95 96 */ 96 97 public static function migration_tools_content() { 97 98 wp_enqueue_script( 'whx_migration_tools' ); 98 wp_enqueue_script( 'whx_migration_tools', WHOLESALEX_MIGRATION_URL . 'assets/js/whx_migration_tools.js', array( 'react', 'react-dom', 'wp-polyfill', 'wp-api-fetch' , 'wholesalex_components', 'wholesalex_node_vendors'), WHOLESALEX_MIGRATION_VER, true );99 wp_enqueue_script( 'whx_migration_tools', WHOLESALEX_MIGRATION_URL . 'assets/js/whx_migration_tools.js', array( 'react', 'react-dom', 'wp-polyfill', 'wp-api-fetch' ), WHOLESALEX_MIGRATION_VER, true ); 99 100 wp_localize_script( 100 101 'whx_migration_tools', … … 106 107 'allow_b2bking_migration' => ! wholesalex()->get_setting( 'b2bking_migration_complete', false ), 107 108 'migration_status' => array( 108 'b2bking_migration' => get_transient( 'wholesalex_b2bking_migrating' ) ? 'running' : ( wholesalex()->get_setting( 'b2bking_migration_complete' ) ?'complete':false),109 'wholesale_suite_migration' => get_transient( 'wholesalex_wholesalex_suite_migrating' ) ? 'running' : ( wholesalex()->get_setting( 'wholesale_suite_migration_complete' )?'complete':false)110 ), 111 'stats' => array(112 'b2bking_migration' => get_transient('wholesalex_b2bking_migration_stats'),113 'wholesale_suite_migration' => get_transient( 'wholesalex_wholesale_suite_migration_stats'),114 ) 109 'b2bking_migration' => get_transient( 'wholesalex_b2bking_migrating' ) ? 'running' : ( wholesalex()->get_setting( 'b2bking_migration_complete' ) ? 'complete' : false ), 110 'wholesale_suite_migration' => get_transient( 'wholesalex_wholesalex_suite_migrating' ) ? 'running' : ( wholesalex()->get_setting( 'wholesale_suite_migration_complete' ) ? 'complete' : false ), 111 ), 112 'stats' => array( 113 'b2bking_migration' => get_transient( 'wholesalex_b2bking_migration_stats' ), 114 'wholesale_suite_migration' => get_transient( 'wholesalex_wholesale_suite_migration_stats' ), 115 ), 115 116 ) 116 117 ); … … 182 183 'label' => __( 'Wholesale Suite Migration', 'wholesalex' ), 183 184 'attr' => array( 184 'migrate_to_wholesalex_roles' => array(185 'migrate_to_wholesalex_roles' => array( 185 186 'label' => 'Roles', 186 187 'desc' => 'Wholesale Suite Roles to WholesaleX Roles', 187 188 ), 188 'migrate_products_meta' => array(189 'migrate_products_meta' => array( 189 190 'label' => 'Single Product Discounts', 190 191 'desc' => 'Wholesale Suite Single Product Discounts to WholesaleX Single Product Discounts', 191 192 ), 192 'migrate_product_variations_meta' => array(193 'migrate_product_variations_meta' => array( 193 194 'label' => 'Product Variation Discounts', 194 195 'desc' => 'Wholesale Suite Product Variation Discounts to WholesaleX Product Variations Discounts', 195 196 ), 196 'migrate_category_data' => array(197 'migrate_category_data' => array( 197 198 'label' => 'Category', 198 199 'desc' => 'Wholesale Suite Category Discounts to WholesaleX Category Discounts', 199 200 ), 200 'migrate_registration_fields' => array(201 'migrate_registration_fields' => array( 201 202 'label' => 'Registration Fields', 202 203 'desc' => 'Wholesale Suite Custom Fields to WholesaleX Form Fields', 203 204 ), 204 'migrate_general_discount' => array(205 'migrate_general_discount' => array( 205 206 'label' => 'General Discounts', 206 207 'desc' => 'Wholesale Suite General Discounts to WholesaleX Dynamic Rules', 207 208 ), 208 'migrate_shipping_rule' => array(209 'migrate_shipping_rule' => array( 209 210 'label' => 'Shipping Rules', 210 211 'desc' => 'Wholesale Suite Shipping Rule to WholesaleX Dynamic Rules', 211 212 ), 212 'migrate_payment_rule' => array(213 'migrate_payment_rule' => array( 213 214 'label' => 'Payment Rules', 214 215 'desc' => 'Wholesale Suite Payment Rule to WholesaleX Dynamic Rules', 215 216 ), 216 'migrate_tax_rule' => array(217 'migrate_tax_rule' => array( 217 218 'label' => 'Tax Rules', 218 219 'desc' => 'Wholesale Suite Tax Rule to WholesaleX Dynamic Rules', 219 220 ), 220 'migrate_users_meta' => array(221 'migrate_users_meta' => array( 221 222 'label' => 'Users', 222 223 'desc' => 'Wholesale Suite Users to WholesaleX Users', … … 234 235 if ( function_exists( 'b2bkingcore_run' ) ) { 235 236 // B2BKing Installed and Activated 236 require_once WHOLESALEX_MIGRATION_PATH . 'includes/class-wholesalex-b2bking-background-migration.php';237 include_once WHOLESALEX_MIGRATION_PATH . 'includes/class-wholesalex-b2bking-background-migration.php'; 237 238 238 239 // Require B2BKing Migration 239 require_once WHOLESALEX_MIGRATION_PATH . 'includes/class-wholesalex-b2bking-migration.php';240 include_once WHOLESALEX_MIGRATION_PATH . 'includes/class-wholesalex-b2bking-migration.php'; 240 241 WholesaleX_B2BKing_Migration::run(); 241 242 $status = true; … … 244 245 if ( isset( $GLOBALS['wc_wholesale_prices'] ) && ! empty( $GLOBALS['wc_wholesale_prices'] ) ) { 245 246 // Require Wholesale Suite Migration 246 require_once WHOLESALEX_MIGRATION_PATH . 'includes/class-wholesalex-wholesale-suite-background-migration.php';247 248 require_once WHOLESALEX_MIGRATION_PATH . 'includes/class-wholesalex-wholesale-suite-migration.php';247 include_once WHOLESALEX_MIGRATION_PATH . 'includes/class-wholesalex-wholesale-suite-background-migration.php'; 248 249 include_once WHOLESALEX_MIGRATION_PATH . 'includes/class-wholesalex-wholesale-suite-migration.php'; 249 250 WholesaleX_Wholesale_Suite_Migration::run(); 250 251 $status = true; … … 252 253 253 254 if ( $status ) { 254 // add_action( 'admin_menu', array( $this, 'migration_tool_submenu_page_callback' ) );255 // add_action( 'admin_menu', array( $this, 'migration_tool_submenu_page_callback' ) ); 255 256 add_action( 'rest_api_init', array( $this, 'migration_tool_restapi_init' ) ); 256 257 -
wholesalex-migration-tool/tags/1.0.2/readme.txt
r3134803 r3474209 2 2 Contributors: wpxpo 3 3 Tags: WholesaleX, Wholesale Suite, B2BKing, WooCommerce Wholesale, WooCommerce B2B 4 Requires at least: 5.05 Tested up to: 6. 66 Requires PHP: 5.47 Stable tag: 1.0. 14 Requires at least: 6.8 5 Tested up to: 6.9 6 Requires PHP: 7.4 7 Stable tag: 1.0.2 8 8 License: GPLv3 9 9 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 129 129 == Changelog == 130 130 131 = 1.0.2 – 04 March 2026 = 132 * Fix: Refactored migration tools for better maintainability. 133 131 134 = 1.0.1 – 13 Aug 2024 = 132 135 * Fix: Wholesalex Migration Issue Fixed -
wholesalex-migration-tool/tags/1.0.2/wholesalex-migration-tool.php
r3134803 r3474209 10 10 * Plugin URI: https://wordpress.org/plugins/wholesalex-migration-tool 11 11 * Description: This is a migration tool for wholesalex. 12 * Version: 1.0. 112 * Version: 1.0.2 13 13 * Author: wpxpo 14 14 * Author URI: https://wpxpo.com/ … … 25 25 26 26 // Plugin Defined. 27 define( 'WHOLESALEX_MIGRATION_VER', '1.0. 1' );27 define( 'WHOLESALEX_MIGRATION_VER', '1.0.2' ); 28 28 define( 'WHOLESALEX_MIGRATION_URL', plugin_dir_url( __FILE__ ) ); 29 29 define( 'WHOLESALEX_MIGRATION_BASE', plugin_basename( __FILE__ ) ); -
wholesalex-migration-tool/trunk/includes/class-wholesalex-migration-tool.php
r3134803 r3474209 7 7 class WholesaleXMigrationTool { 8 8 9 9 10 /** 10 11 * Instance of this class … … 19 20 * 20 21 * @return WholesaleXMigrationTool|null 21 * @since 1.0.022 * @since 1.0.0 22 23 */ 23 24 public static function run() { … … 35 36 /** 36 37 * Fires as an admin screen or script is being initialized. 37 *38 38 */ 39 add_action('admin_init',function() : void { 40 if(isset($_GET['reset_migration']) && $_GET['reset_migration']=='reset' ) { 41 wholesalex()->set_setting('wholesale_suite_migration_complete',false); 42 wholesalex()->set_setting('b2bking_migration_complete',false); 43 delete_transient('wholesalex_b2bking_migration_stats'); 44 delete_transient('wholesalex_wholesale_suite_migration_stats'); 45 die(); 39 add_action( 40 'admin_init', 41 function (): void { 42 if ( isset( $_GET['reset_migration'] ) && $_GET['reset_migration'] == 'reset' ) { 43 wholesalex()->set_setting( 'wholesale_suite_migration_complete', false ); 44 wholesalex()->set_setting( 'b2bking_migration_complete', false ); 45 delete_transient( 'wholesalex_b2bking_migration_stats' ); 46 delete_transient( 'wholesalex_wholesale_suite_migration_stats' ); 47 die(); 48 } 46 49 } 47 } ); 48 50 ); 49 51 } 50 52 … … 85 87 86 88 do_action( 'wholesalex_migration_tools_restapi_action', $post ); 87 88 89 } 89 90 … … 91 92 * Tools Sub Menu Page Callback 92 93 * 93 * @since 1.2.994 * @since 1.2.9 94 95 * @access public 95 96 */ 96 97 public static function migration_tools_content() { 97 98 wp_enqueue_script( 'whx_migration_tools' ); 98 wp_enqueue_script( 'whx_migration_tools', WHOLESALEX_MIGRATION_URL . 'assets/js/whx_migration_tools.js', array( 'react', 'react-dom', 'wp-polyfill', 'wp-api-fetch' , 'wholesalex_components', 'wholesalex_node_vendors'), WHOLESALEX_MIGRATION_VER, true );99 wp_enqueue_script( 'whx_migration_tools', WHOLESALEX_MIGRATION_URL . 'assets/js/whx_migration_tools.js', array( 'react', 'react-dom', 'wp-polyfill', 'wp-api-fetch' ), WHOLESALEX_MIGRATION_VER, true ); 99 100 wp_localize_script( 100 101 'whx_migration_tools', … … 106 107 'allow_b2bking_migration' => ! wholesalex()->get_setting( 'b2bking_migration_complete', false ), 107 108 'migration_status' => array( 108 'b2bking_migration' => get_transient( 'wholesalex_b2bking_migrating' ) ? 'running' : ( wholesalex()->get_setting( 'b2bking_migration_complete' ) ?'complete':false),109 'wholesale_suite_migration' => get_transient( 'wholesalex_wholesalex_suite_migrating' ) ? 'running' : ( wholesalex()->get_setting( 'wholesale_suite_migration_complete' )?'complete':false)110 ), 111 'stats' => array(112 'b2bking_migration' => get_transient('wholesalex_b2bking_migration_stats'),113 'wholesale_suite_migration' => get_transient( 'wholesalex_wholesale_suite_migration_stats'),114 ) 109 'b2bking_migration' => get_transient( 'wholesalex_b2bking_migrating' ) ? 'running' : ( wholesalex()->get_setting( 'b2bking_migration_complete' ) ? 'complete' : false ), 110 'wholesale_suite_migration' => get_transient( 'wholesalex_wholesalex_suite_migrating' ) ? 'running' : ( wholesalex()->get_setting( 'wholesale_suite_migration_complete' ) ? 'complete' : false ), 111 ), 112 'stats' => array( 113 'b2bking_migration' => get_transient( 'wholesalex_b2bking_migration_stats' ), 114 'wholesale_suite_migration' => get_transient( 'wholesalex_wholesale_suite_migration_stats' ), 115 ), 115 116 ) 116 117 ); … … 182 183 'label' => __( 'Wholesale Suite Migration', 'wholesalex' ), 183 184 'attr' => array( 184 'migrate_to_wholesalex_roles' => array(185 'migrate_to_wholesalex_roles' => array( 185 186 'label' => 'Roles', 186 187 'desc' => 'Wholesale Suite Roles to WholesaleX Roles', 187 188 ), 188 'migrate_products_meta' => array(189 'migrate_products_meta' => array( 189 190 'label' => 'Single Product Discounts', 190 191 'desc' => 'Wholesale Suite Single Product Discounts to WholesaleX Single Product Discounts', 191 192 ), 192 'migrate_product_variations_meta' => array(193 'migrate_product_variations_meta' => array( 193 194 'label' => 'Product Variation Discounts', 194 195 'desc' => 'Wholesale Suite Product Variation Discounts to WholesaleX Product Variations Discounts', 195 196 ), 196 'migrate_category_data' => array(197 'migrate_category_data' => array( 197 198 'label' => 'Category', 198 199 'desc' => 'Wholesale Suite Category Discounts to WholesaleX Category Discounts', 199 200 ), 200 'migrate_registration_fields' => array(201 'migrate_registration_fields' => array( 201 202 'label' => 'Registration Fields', 202 203 'desc' => 'Wholesale Suite Custom Fields to WholesaleX Form Fields', 203 204 ), 204 'migrate_general_discount' => array(205 'migrate_general_discount' => array( 205 206 'label' => 'General Discounts', 206 207 'desc' => 'Wholesale Suite General Discounts to WholesaleX Dynamic Rules', 207 208 ), 208 'migrate_shipping_rule' => array(209 'migrate_shipping_rule' => array( 209 210 'label' => 'Shipping Rules', 210 211 'desc' => 'Wholesale Suite Shipping Rule to WholesaleX Dynamic Rules', 211 212 ), 212 'migrate_payment_rule' => array(213 'migrate_payment_rule' => array( 213 214 'label' => 'Payment Rules', 214 215 'desc' => 'Wholesale Suite Payment Rule to WholesaleX Dynamic Rules', 215 216 ), 216 'migrate_tax_rule' => array(217 'migrate_tax_rule' => array( 217 218 'label' => 'Tax Rules', 218 219 'desc' => 'Wholesale Suite Tax Rule to WholesaleX Dynamic Rules', 219 220 ), 220 'migrate_users_meta' => array(221 'migrate_users_meta' => array( 221 222 'label' => 'Users', 222 223 'desc' => 'Wholesale Suite Users to WholesaleX Users', … … 234 235 if ( function_exists( 'b2bkingcore_run' ) ) { 235 236 // B2BKing Installed and Activated 236 require_once WHOLESALEX_MIGRATION_PATH . 'includes/class-wholesalex-b2bking-background-migration.php';237 include_once WHOLESALEX_MIGRATION_PATH . 'includes/class-wholesalex-b2bking-background-migration.php'; 237 238 238 239 // Require B2BKing Migration 239 require_once WHOLESALEX_MIGRATION_PATH . 'includes/class-wholesalex-b2bking-migration.php';240 include_once WHOLESALEX_MIGRATION_PATH . 'includes/class-wholesalex-b2bking-migration.php'; 240 241 WholesaleX_B2BKing_Migration::run(); 241 242 $status = true; … … 244 245 if ( isset( $GLOBALS['wc_wholesale_prices'] ) && ! empty( $GLOBALS['wc_wholesale_prices'] ) ) { 245 246 // Require Wholesale Suite Migration 246 require_once WHOLESALEX_MIGRATION_PATH . 'includes/class-wholesalex-wholesale-suite-background-migration.php';247 248 require_once WHOLESALEX_MIGRATION_PATH . 'includes/class-wholesalex-wholesale-suite-migration.php';247 include_once WHOLESALEX_MIGRATION_PATH . 'includes/class-wholesalex-wholesale-suite-background-migration.php'; 248 249 include_once WHOLESALEX_MIGRATION_PATH . 'includes/class-wholesalex-wholesale-suite-migration.php'; 249 250 WholesaleX_Wholesale_Suite_Migration::run(); 250 251 $status = true; … … 252 253 253 254 if ( $status ) { 254 // add_action( 'admin_menu', array( $this, 'migration_tool_submenu_page_callback' ) );255 // add_action( 'admin_menu', array( $this, 'migration_tool_submenu_page_callback' ) ); 255 256 add_action( 'rest_api_init', array( $this, 'migration_tool_restapi_init' ) ); 256 257 -
wholesalex-migration-tool/trunk/readme.txt
r3134803 r3474209 2 2 Contributors: wpxpo 3 3 Tags: WholesaleX, Wholesale Suite, B2BKing, WooCommerce Wholesale, WooCommerce B2B 4 Requires at least: 5.05 Tested up to: 6. 66 Requires PHP: 5.47 Stable tag: 1.0. 14 Requires at least: 6.8 5 Tested up to: 6.9 6 Requires PHP: 7.4 7 Stable tag: 1.0.2 8 8 License: GPLv3 9 9 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 129 129 == Changelog == 130 130 131 = 1.0.2 – 04 March 2026 = 132 * Fix: Refactored migration tools for better maintainability. 133 131 134 = 1.0.1 – 13 Aug 2024 = 132 135 * Fix: Wholesalex Migration Issue Fixed -
wholesalex-migration-tool/trunk/wholesalex-migration-tool.php
r3134803 r3474209 10 10 * Plugin URI: https://wordpress.org/plugins/wholesalex-migration-tool 11 11 * Description: This is a migration tool for wholesalex. 12 * Version: 1.0. 112 * Version: 1.0.2 13 13 * Author: wpxpo 14 14 * Author URI: https://wpxpo.com/ … … 25 25 26 26 // Plugin Defined. 27 define( 'WHOLESALEX_MIGRATION_VER', '1.0. 1' );27 define( 'WHOLESALEX_MIGRATION_VER', '1.0.2' ); 28 28 define( 'WHOLESALEX_MIGRATION_URL', plugin_dir_url( __FILE__ ) ); 29 29 define( 'WHOLESALEX_MIGRATION_BASE', plugin_basename( __FILE__ ) );
Note: See TracChangeset
for help on using the changeset viewer.