Plugin Directory

Changeset 2971116


Ignore:
Timestamp:
09/25/2023 07:46:59 AM (3 years ago)
Author:
thanhtd
Message:

Update

Location:
woo-alidropship/trunk
Files:
1 added
6 edited

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
    15/**1.1.4 – 2023.09.23*/
    26– Fixed: Duplicate class
  • woo-alidropship/trunk/admin/settings.php

    r2968650 r2971116  
    409409            <h2><?php esc_html_e( 'ALD - Dropshipping and Fulfillment for AliExpress and WooCommerce Settings', 'woo-alidropship' ) ?></h2>
    410410            <?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            }
    411420            $messages = array();
    412421            if ( VI_WOO_ALIDROPSHIP_DATA::get_disable_wp_cron() ) {
     
    577586
    578587                        <?php
    579                         /*
    580588                        if ( ! get_option( 'ald_deleted_old_posts_data' ) ) {
    581589                            ?>
    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>
    588595                                    <?php
    589596                                    $migrate_process = VI_WOO_ALIDROPSHIP_Admin_Migrate_New_Table::migrate_process();
     
    602609                                        } else {
    603610                                            ?>
    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">
    605612                                                <?php esc_html_e( 'Migrate & use new table', 'woocommerce-alidropship' ); ?>
    606                                             </button>
     613                                            </button>
    607614                                            <?php
    608615                                        }
    609616                                    } else {
    610617                                        ?>
    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>
    618627                                        <?php
    619628                                        if ( ! $migrate_process->is_queue_empty() || $migrate_process->is_process_running() ) {
    620629                                            printf( "<div class='vi-ui message red '><b>%s</b></div>",
    621630                                                esc_html__( 'Deleting old data in background', 'woocommerce-alidropship' ) );
    622 
    623631                                        } else {
    624632                                            $count_ali_post_type = array_sum( (array) wp_count_posts( 'vi_wad_draft_product' ) );
    625633                                            if ( $count_ali_post_type || ! get_option( 'ald_deleted_old_posts_data' ) ) {
    626634                                                ?>
    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>
    630641                                                <?php
    631642                                            }
     
    633644                                    }
    634645                                    ?>
    635                                 </td>
    636                             </tr>
     646                                </td>
     647                            </tr>
    637648                            <?php
    638649                        }
    639                         */
     650
    640651                        ?>
    641652                        </tbody>
  • woo-alidropship/trunk/assets/js/admin.js

    r2968650 r2971116  
    503503            },
    504504            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>`);
    508506                $thisBtn.removeClass('ald-migrate-to-new-table');
    509507            },
     
    515513
    516514    $('.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
    520517        let $thisBtn = $(this);
    521518        $thisBtn.addClass('loading');
     
    530527            },
    531528            success(res) {
    532                 $thisBtn.text(res.data);
     529                $thisBtn.replaceWith(`<div class="vi-ui message blue">${res.data}</div>`);
    533530                $thisBtn.removeClass('ald-migrate-remove-old-data');
    534531            },
  • woo-alidropship/trunk/includes/data.php

    r2968650 r2971116  
    23722372        $description_setting = $this->get_params( 'product_description' );
    23732373        $specsModule         = apply_filters( 'vi_wad_import_product_specifications', $specsModule, $data );
     2374
    23742375        if ( count( $specsModule ) ) {
    23752376            ob_start();
     
    23932394            $short_description = apply_filters( 'vi_wad_import_product_short_description', $short_description, $data );
    23942395        }
     2396
    23952397        switch ( $description_setting ) {
    23962398            case 'none':
     
    24122414                $description = $short_description . $description;
    24132415        }
     2416
    24142417        $original_desc_images = array();
    24152418        if ( $description ) {
     
    24202423            }
    24212424        }
     2425
    24222426        $description = $this->find_and_replace_strings( $description );
    24232427        if ( $description ) {
     
    24322436            }
    24332437        }
     2438
    24342439        $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(
    24372443            'post_title'   => $title,
    24382444            'post_type'    => 'vi_wad_draft_product',
     
    25402546        );
    25412547        $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 ) {
    25432552            if ( isset( $request['body'] ) && $request['body'] ) {
    25442553                $body        = preg_replace( '/<script\>[\s\S]*?<\/script>/im', '', $request['body'] );
  • woo-alidropship/trunk/readme.txt

    r2970485 r2971116  
    316316
    317317== Changelog ==
     318
     319/**2.0.0 – 2023.09.25*/
     320– Updated: Move Ali product to new table
     321– Fixed: Description 404
     322
    318323/**1.1.4 – 2023.09.23*/
    319324– Fixed: Duplicate class
  • woo-alidropship/trunk/woo-alidropship.php

    r2970485 r2971116  
    44 * Plugin URI: https://villatheme.com/extensions/aliexpress-dropshipping-and-fulfillment-for-woocommerce/
    55 * Description: Transfer data from AliExpress products to WooCommerce effortlessly and fulfill WooCommerce orders to AliExpress automatically.
    6  * Version: 1.1.4
     6 * Version: 2.0.0
    77 * Author: VillaTheme(villatheme.com)
    88 * Author URI: http://villatheme.com
     
    1010 * Copyright 2019-2023 VillaTheme.com. All rights reserved.
    1111 * Tested up to: 6.3
    12  * WC tested up to: 8.0
     12 * WC tested up to: 8.1
    1313 * Requires PHP: 7.0
    1414 **/
     
    1818}
    1919
    20 define( 'VI_WOO_ALIDROPSHIP_VERSION', '1.1.4' );
     20define( 'VI_WOO_ALIDROPSHIP_VERSION', '2.0.0' );
    2121define( 'VI_WOO_ALIDROPSHIP_DIR', plugin_dir_path( __FILE__ ) );
    2222define( 'VI_WOO_ALIDROPSHIP_INCLUDES', VI_WOO_ALIDROPSHIP_DIR . "includes" . DIRECTORY_SEPARATOR );
Note: See TracChangeset for help on using the changeset viewer.