Changeset 2971116
- Timestamp:
- 09/25/2023 07:46:59 AM (3 years ago)
- Location:
- woo-alidropship/trunk
- Files:
-
- 1 added
- 6 edited
-
CHANGELOG.txt (modified) (1 diff)
-
admin/settings.php (modified) (4 diffs)
-
assets/js/admin.js (modified) (3 diffs)
-
assets/packages/categories.json (added)
-
includes/data.php (modified) (6 diffs)
-
readme.txt (modified) (1 diff)
-
woo-alidropship.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
woo-alidropship/trunk/CHANGELOG.txt
r2970485 r2971116 1 /**2.0.0 – 2023.09.25*/ 2 – Updated: Move Ali product to new table 3 – Fixed: Description 404 4 1 5 /**1.1.4 – 2023.09.23*/ 2 6 – Fixed: Duplicate class -
woo-alidropship/trunk/admin/settings.php
r2968650 r2971116 409 409 <h2><?php esc_html_e( 'ALD - Dropshipping and Fulfillment for AliExpress and WooCommerce Settings', 'woo-alidropship' ) ?></h2> 410 410 <?php 411 if ( ! get_option( 'ald_deleted_old_posts_data' ) ) { 412 ?> 413 <div class="vi-ui message info"> 414 <a href="#ald-migrate-table"> 415 <?php esc_html_e( 'Migrate import list/imported to new data table', 'woocommerce-alidropship' ); ?> 416 </a> 417 </div> 418 <?php 419 } 411 420 $messages = array(); 412 421 if ( VI_WOO_ALIDROPSHIP_DATA::get_disable_wp_cron() ) { … … 577 586 578 587 <?php 579 /*580 588 if ( ! get_option( 'ald_deleted_old_posts_data' ) ) { 581 589 ?> 582 <tr> 583 <th> 584 <label><?php esc_html_e( 'Use new table for Ali product', 'woocommerce-alidropship' ) ?></label> 585 </th> 586 <td> 587 590 <tr id="ald-migrate-table"> 591 <th> 592 <label><?php esc_html_e( 'Use new table for Ali product', 'woocommerce-alidropship' ) ?></label> 593 </th> 594 <td> 588 595 <?php 589 596 $migrate_process = VI_WOO_ALIDROPSHIP_Admin_Migrate_New_Table::migrate_process(); … … 602 609 } else { 603 610 ?> 604 <button type="button" class="vi-ui button ald-migrate-to-new-table blue">611 <button type="button" class="vi-ui button ald-migrate-to-new-table blue"> 605 612 <?php esc_html_e( 'Migrate & use new table', 'woocommerce-alidropship' ); ?> 606 </button>613 </button> 607 614 <?php 608 615 } 609 616 } else { 610 617 ?> 611 <div class="vi-ui toggle checkbox"> 612 <input id="<?php self::set_params( 'ald_table', true ) ?>" 613 type="checkbox" <?php checked( self::$settings->get_params( 'ald_table' ), 1 ) ?> 614 tabindex="0" class="<?php self::set_params( 'ald_table', true ) ?>" 615 value="1" name="<?php self::set_params( 'ald_table' ) ?>"/> 616 <label><?php esc_html_e( '', 'woocommerce-alidropship' ) ?></label> 617 </div> 618 <div class="vi-ui toggle checkbox"> 619 <input id="<?php self::set_params( 'ald_table', true ) ?>" 620 type="checkbox" <?php checked( self::$settings->get_params( 'ald_table' ), 1 ) ?> 621 tabindex="0" class="<?php self::set_params( 'ald_table', true ) ?>" 622 value="1" 623 name="<?php self::set_params( 'ald_table' ) ?>"/> 624 <label><?php esc_html_e( 'Change to use data from new table', 'woocommerce-alidropship' ) ?></label> 625 <br> 626 </div> 618 627 <?php 619 628 if ( ! $migrate_process->is_queue_empty() || $migrate_process->is_process_running() ) { 620 629 printf( "<div class='vi-ui message red '><b>%s</b></div>", 621 630 esc_html__( 'Deleting old data in background', 'woocommerce-alidropship' ) ); 622 623 631 } else { 624 632 $count_ali_post_type = array_sum( (array) wp_count_posts( 'vi_wad_draft_product' ) ); 625 633 if ( $count_ali_post_type || ! get_option( 'ald_deleted_old_posts_data' ) ) { 626 634 ?> 627 <button type="button" class="vi-ui button ald-migrate-remove-old-data red"> 628 <?php esc_html_e( 'Remove old data in posts table', 'woocommerce-alidropship' ); ?> 629 </button> 635 <div> 636 <button type="button" class="vi-ui button ald-migrate-remove-old-data red"> 637 <?php esc_html_e( 'Remove old data in posts table', 'woocommerce-alidropship' ); ?> 638 </button> 639 <p><?php esc_html_e( 'Note: You should backup data before doing this action', 'woocommerce-alidropship' ) ?></p> 640 </div> 630 641 <?php 631 642 } … … 633 644 } 634 645 ?> 635 </td>636 </tr>646 </td> 647 </tr> 637 648 <?php 638 649 } 639 */ 650 640 651 ?> 641 652 </tbody> -
woo-alidropship/trunk/assets/js/admin.js
r2968650 r2971116 503 503 }, 504 504 success(res) { 505 console.log(res) 506 // villatheme_admin_show_message(res.data); 507 $thisBtn.text(res.data); 505 $thisBtn.replaceWith(`<div class="vi-ui message blue">${res.data}</div>`); 508 506 $thisBtn.removeClass('ald-migrate-to-new-table'); 509 507 }, … … 515 513 516 514 $('.ald-migrate-remove-old-data').on('click', function () { 517 if (!confirm('Do you want to remove old data from posts table?')) { 518 return; 519 } 515 if (!confirm('Do you want to remove old data from posts table?')) return; 516 520 517 let $thisBtn = $(this); 521 518 $thisBtn.addClass('loading'); … … 530 527 }, 531 528 success(res) { 532 $thisBtn. text(res.data);529 $thisBtn.replaceWith(`<div class="vi-ui message blue">${res.data}</div>`); 533 530 $thisBtn.removeClass('ald-migrate-remove-old-data'); 534 531 }, -
woo-alidropship/trunk/includes/data.php
r2968650 r2971116 2372 2372 $description_setting = $this->get_params( 'product_description' ); 2373 2373 $specsModule = apply_filters( 'vi_wad_import_product_specifications', $specsModule, $data ); 2374 2374 2375 if ( count( $specsModule ) ) { 2375 2376 ob_start(); … … 2393 2394 $short_description = apply_filters( 'vi_wad_import_product_short_description', $short_description, $data ); 2394 2395 } 2396 2395 2397 switch ( $description_setting ) { 2396 2398 case 'none': … … 2412 2414 $description = $short_description . $description; 2413 2415 } 2416 2414 2417 $original_desc_images = array(); 2415 2418 if ( $description ) { … … 2420 2423 } 2421 2424 } 2425 2422 2426 $description = $this->find_and_replace_strings( $description ); 2423 2427 if ( $description ) { … … 2432 2436 } 2433 2437 } 2438 2434 2439 $description = apply_filters( 'vi_wad_import_product_description', $description, $data ); 2435 $title = $this->find_and_replace_strings( $title ); 2436 $post_id = Ali_Product_Table::wp_insert_post( array_merge( array( 2440 2441 $title = $this->find_and_replace_strings( $title ); 2442 $post_id = Ali_Product_Table::wp_insert_post( array_merge( array( 2437 2443 'post_title' => $title, 2438 2444 'post_type' => 'vi_wad_draft_product', … … 2540 2546 ); 2541 2547 $description = ''; 2542 if ( ! is_wp_error( $request ) ) { 2548 2549 $response_code = wp_remote_retrieve_response_code( $request ); 2550 2551 if ( ! is_wp_error( $request ) && $response_code !== 404 ) { 2543 2552 if ( isset( $request['body'] ) && $request['body'] ) { 2544 2553 $body = preg_replace( '/<script\>[\s\S]*?<\/script>/im', '', $request['body'] ); -
woo-alidropship/trunk/readme.txt
r2970485 r2971116 316 316 317 317 == Changelog == 318 319 /**2.0.0 – 2023.09.25*/ 320 – Updated: Move Ali product to new table 321 – Fixed: Description 404 322 318 323 /**1.1.4 – 2023.09.23*/ 319 324 – Fixed: Duplicate class -
woo-alidropship/trunk/woo-alidropship.php
r2970485 r2971116 4 4 * Plugin URI: https://villatheme.com/extensions/aliexpress-dropshipping-and-fulfillment-for-woocommerce/ 5 5 * Description: Transfer data from AliExpress products to WooCommerce effortlessly and fulfill WooCommerce orders to AliExpress automatically. 6 * Version: 1.1.46 * Version: 2.0.0 7 7 * Author: VillaTheme(villatheme.com) 8 8 * Author URI: http://villatheme.com … … 10 10 * Copyright 2019-2023 VillaTheme.com. All rights reserved. 11 11 * Tested up to: 6.3 12 * WC tested up to: 8. 012 * WC tested up to: 8.1 13 13 * Requires PHP: 7.0 14 14 **/ … … 18 18 } 19 19 20 define( 'VI_WOO_ALIDROPSHIP_VERSION', ' 1.1.4' );20 define( 'VI_WOO_ALIDROPSHIP_VERSION', '2.0.0' ); 21 21 define( 'VI_WOO_ALIDROPSHIP_DIR', plugin_dir_path( __FILE__ ) ); 22 22 define( 'VI_WOO_ALIDROPSHIP_INCLUDES', VI_WOO_ALIDROPSHIP_DIR . "includes" . DIRECTORY_SEPARATOR );
Note: See TracChangeset
for help on using the changeset viewer.